2D Rotation Trig

2D Rotation Trig

In this script the rotation is made around the ‘would be’ z-axis in a 3D environment. As we keep looping the angle θ value in radian up to 2π(6.28)(360°), sine and cosine relationship/ratio values will keep changing accordingly. So, in math when you want to know the exact length of the θ’s opposite line, you multiply hypotenuse with its sine, in our case the coordinate Y. Multiply hypotenuse with co-sinus, and you get the actual length of the adjacent line as well, in our case the coordinate X. Hypotenuse becomes the range(line) from θ to the coordinates X/Y, ie. the radius.

Click here to open the script in a new window.

Leave a Reply