I was wondering how it would be possible for me to rotate a cube diagonally 360 degrees.
I am able to rotate it over the x-axis, y-axis and z-axis with the following formulas :
**x-axis**
y = v.y*cos(degree) - v.z*sin(degree);
z = v.y*sin(degree) + v.z*cos(degree);
**y-axis**
x = v.z * sin(degree) + v.x * cos(degree);
z = v.z * cos(degree) - v.x * sin(degree);
**z-axis**
x = v.x * cos(degree) - v.y * sin(degree);
y = v.x * sin(degree) + v.y * cos(degree);
Thanks in advance!
Wikipedia will tell you everything: http://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle