Skip to main content

Transform Calculator

Key Insight

A rotation in 3D has only three degrees of freedom, yet robotics code stores it in several different shapes — a 3×3 rotation matrix, a four-number quaternion, or a three-number axis-angle vector — because each shape is best at a different job: matrices compose by plain multiplication, quaternions interpolate smoothly and never suffer gimbal lock, and axis-angle vectors are the natural variables for optimization. The skill this project drills is converting between those shapes and round-tripping back to the original without drift, because a real codebase mixes all three and a silent conversion bug sends your gripper to the wrong orientation while still reporting success. Round-tripping 10,000 random rotations and checking that the error stays below 1e-10 is how you prove the math itself is correct, not just that one lucky example happened to work.