Coding Math: Episode 26 - 2D and 3D Coordinate Rotation

preview_player
Показать описание
In which we learn how to rotate and x, y or x, y, z coordinate around an origin point. And, I make an offhand reference to The Six Million Dollar Man and Airplane. Go 70s!

Рекомендации по теме
Комментарии
Автор

Why does this not have more views!?!? Great tutorials, thank you!

zeejenkins
Автор

Thanks, this is exactly what I need to do. But when I tried it, it just totally flattened my 3D model ! It was totally squashed lol. It was just a typo in my code, a "-" instead of a "+" but it was a funny consequence. Very kind of you to share your knowledge.

cargorunner
Автор

Thanks for your tutorials. They are really really easy to understand(because of your clear explaination)  and easy to follow. Thanks for your step to step teaching. I come from China, and I will let more people to know 'coding math'. Thank you.

kidliaa
Автор

You did a very good job at explaining the math concept. Thanks!!!

howlu
Автор

I haven't looked into this code in a while. But one of the ways I did 3D to fix that stuff with stuff behind the camera, I did a simple if point z is < 0 (in the camera) then draw the shape. However of course then how I was drawing the shape made it so if any z point is behind the camera then it won't draw the shape at all. So I don't know how to do clipping but there was some fix that was odd... If the z was behind the camera times the x and y by -10. Still not as good as clipping but, yeah. Hoping you're doing alright Keith, It's been a while D';

Zilarrezko
Автор

This is just what I was looking for! Thanks!

joaocesardelima
Автор

that's the first time that i watch u and ur videos are incredible

idks
Автор

You are awesome. I'm how many years in now ? I'm still learning from you.

Hope you are well Keith

johnconley
Автор

It behooves me to ask... how to you move the camera around and leave the model where it is? In 3D games, you're not translating the entire world every time you press W, right?

kevnar
Автор

Thank you SO MUCH! I really need this. I was working on an animation, and needed to convert global coordinates to local coorinates (because the object was rotated). So at the moment, Im just subtracting the objects global coordinates from its global coordinates, then using the method described above for subtracting the objects rotation on all axis. Is there a better way of doing this? Also, could you explain how this method actually works in another video? I like to know how things work, it helps a lot. I tried finding out on my own but couldn't. Great video by the way!!! :-)

sethatkins
Автор

I hate to ask, because it's so advanced is some cases. but everyone else who puts there code out there or is trying to explain, just kinda sucks or is empty or non-understandable. Could you do a series on pathfinding? Like A* or even the daunting jump point search?

Zilarrezko
Автор

Hey ! New coding math episode ! Thank Keith !
I dont understant the "centerZ" thing you added a the end ? Does it move the "camera" ? The cube ? How is it affecting the perspective formula ?

TheGrifdail
Автор

Thanks a lot for all this amazing videos! Just a question... once I move the cube to the backgraound or to the sides, it will stop rotation to its center. Can you give me a top on how to get my model always rotatin to its cener?
Thanks!!

eduugr
Автор

There is a well established convention in 2D Cartesian coordinates where positive y goes up.  Also positive angles, by convention, go counterclockwise from the x-axis.  Why not follow these conventions?   What is the advantage of positive y-down?

pbierre
Автор

I appreciate the Airplane reference haha

MizManFryingP
Автор

Hi, Keith! I'm Jim From China, big fan of your book. First, i want to thank you for writing such an awesome book.(for those who don't it yet, its called Foundation ActionScript 3.0 Animation Making Things Move).
But there is a little question has been bothering me since i was reading your book.
It's the y-axis rotation formula, x1 = cos(angleY) * x - sin(angleY) * z; z1 = cos(angleY) * z + sin(angleY) * x;
in the right-hand system, this is positive rotation or negative?

mj
Автор

thank god you switched to actual code, i cant read your handwriting

Coldsteak
Автор

please could radon transform could transform 3d objects files to 2d object such as 2d pictures?

gloriouswingsresearch
Автор

WOO! CODING! 3D! YA! EXCITEMENT! awww it's over D';

Zilarrezko
Автор

Thank you so much i got my d3box hack in ros with rotation now 😀😁

selnacarpio