3D Programming
This will be where I put all the interesting/important bits about programming 3d/cg things. Anything from sample code to concepts and ideas.
3D Rotation
(From Hugi Magazine #31)
Z Axis Rotation
new_x = x * cos(z_angle) - y * sin(z_angle)
new_y = y * cos(z_angle) + x * sin(z_angle)X Axis Rotation
new_y = y * cos(x_angle) - z * sin(x_angle)
new_z = y * sin(x_angle) + z * cos(x_angle)Y Axis Rotation
new_z = z * cos(y_angle) - x * sin(y_angle)
new_x = z * sin(y_angle) + x * cos(y_angle)