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
Welcome to Thronic.com
Search this Site
Miscellaneous Links
Recent Articles
- Linux Bash Color
- Resize a div layer with javascript
- Moving a div layer with javascript
- Web Galaxy » A sci-fi browser game
- Windows 7 on Asus Eee 900 PC
- IE and PHP sessions
- Wordpress 2.8.6 Spell Check Languages
- Reset MySQL Root Password
- Linux hosts file
- IdleGuard
- Column count in SQL
- String encryption in PHP
- Alphanumeric Captcha values in PHP
- Your own numeric Captcha in PHP
- DHTML Flyout Menus
