We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › calculating the axis of rotation
Page Index Toggle Pages: 1
calculating the axis of rotation (Read 764 times)
calculating the axis of rotation
Apr 12th, 2006, 12:42pm
 
Hello,
As my brain is starting to smoke, and google cant seem to give me an understandable answer, turn to you for a possible solution.
my problem is as follows:
I have a point defined in polar coordinates (Zrotation, Yrotation and distance), now i need to find out what the absolute rotation is, by that i mean a single rotation around a defined axis that returns the same point in space.
I've been speculating that this angle is sqrt(Zrotation^2 + Yrotation^2) but i havent been able to verify this. Is there anyone out here that have a better understanding of this than me? also i would like to know how to calculate the axis of this rotation.
hope my explanation is understandable:

regards

Henrik
Re: calculating the axis of rotation
Reply #1 - Apr 13th, 2006, 12:24pm
 
You can get the axis of rotation by doing a cross product of the original vector (0 rotation, but some distance) and the resultant vector (after the y/z rotations), but you'll have to convert from polar to cartesian co-ordinates.
Re: calculating the axis of rotation
Reply #2 - Apr 13th, 2006, 4:28pm
 
Thanks again my geometric friend!
Re: calculating the axis of rotation
Reply #3 - Apr 14th, 2006, 2:54pm
 
btw, to get the combined angle, is the formula totalAngle = sqrt(zAngle^2 + yAngle^2) correct?

Re: calculating the axis of rotation
Reply #4 - Apr 14th, 2006, 3:48pm
 
I don't know.. but it looks like it should work... Test it and see Smiley
Page Index Toggle Pages: 1