English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

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

2 answers

I can see your problem more than mathematics shortcut, you look for understanding to satisfy your urge to know, mathematical formula will not be enough to rotate an object in a computer, first you have to consider which angular system it is using, then you have to consider when rotating a point in space two axes moves and one stays stable, if in combination movement, calculate each axes displacement then follow up the next one.I have gone through the burden of this since 1995 and solved it in 2 weeks on my own, I actually created a program in qbasic to see what I like to see and its very successful than mathematical direct formula used. I can send you my sample executable file if you wanted me to.

2007-01-19 10:34:36 · answer #1 · answered by Dosage 3 · 0 0

When in 3D, you have to find the 3D plane in the x, y and z which will rotate about an axis perpindicular to this plan. You do this with three different 3d points. Then you can find a Normal vector by taking the cross product of one vector, xy, into a different vector, say xz. This vector is perpindicular to the plane. Then you situate the Normal vector at the point where you want the axis to rotate.

The study of this is called analytical geometry.

2007-01-19 11:35:40 · answer #2 · answered by daedgewood 4 · 0 0

fedest.com, questions and answers