Advertisement

Formulas for rotation at y=x axis?

Started by July 13, 2004 02:29 AM
2 comments, last by VolkerG 20 years, 4 months ago
Anyone....Glad if someone could help .
Best Regards,from psjie
y = x is not an axis, it's a plane. Perhaps you mean rotation about the vector (1, 1, 0)? If so, you can just use glRotate to get rotation about a vector.
Advertisement
I'm solving a math question . I couldn't remember the rotation formula for plane x=y,

an example of rotation on the z-axis ,

(cos () , -sin () , 0 , 0)
(sin () , cos () , 0 , 0)
(0 , 0 , 1 , 0)
(0 , 0 , 0 , 1)


Best Regards,from psjie
To rotate around an axis u=(u0,u1,u2) by an angle x use the following matrix:
R = I + (sin x)S + (1 - cos f)S*S,
where I is the 3*3 identity matrix and S is the skew-symmetric matrix:
S = ((0, u2, -u1),(-u2, 0, u0), (u1, -u0, 0))

Taken from D.H. Eberly: "3D Game Engine Design".

This topic is closed to new replies.

Advertisement