I've written a program to rotate objects in 3D. It works good. I could never quite get my head around 3D rotation though. So I figured out 2D first:
1) Start with a point, X,Y
2) Find the angle using ATAN
3) Rotate the angle whatever
4) Recalc and redraw X,Y
Works great
I got really confused when it came to 3D because of the more complex relationships between the different axes.
So I did this:
1) Start with X,Y,Z
2) Find angle for X,Y using ATAN
3) Rotate some
4) Recalc X,Y
5) Find angle for Y,Z
6) Rotate
7) Recalc Y,Z
8) Find angle for X,Z
9) Rotate
10) Recalc and redraw X,Y,Z
I probably did more steps here than I needed, but I had to keep the axes separate so I could visually comprehend what I was doing. Can anyone explain 3D relationships clearly and how the angles/sines/cosines/tangents are related. Can this be done more simply and please explain why.
Also, is there a way to rotate 2D and 3D cartesian coordinates without finding the angles?
Thanks
2007-01-19
08:56:49
·
2 answers
·
asked by
ExcelerNot
2
in
Science & Mathematics
➔ Physics