Formulas for rotation at y=x axis?
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.
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)
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".
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
Popular Topics
Advertisement