Go Back   Winamp Forums > Visualizations > AVS > AVS Presets

Reply
Thread Tools Search this Thread Display Modes
Old 23rd July 2002, 01:53   #1
ryan
not fucked, not quite.
(Forum King)
 
ryan's Avatar
 
Join Date: Feb 2002
Location: Tn
Posts: 8,755
Send a message via AIM to ryan
Rotation

I was wondering if anyone could post a movement code for rotation.
ryan is offline   Reply With Quote
Old 23rd July 2002, 10:57   #2
UnConeD
Whacked Moderator
 
UnConeD's Avatar
 
Join Date: Jun 2001
Posts: 2,104
Mmmm this needs to become a FAQ. Basic rotation goes like this:

x' = x*cos(a) - y*sin(a);
y' = x*sin(a) + y*cos(a);

where a is the angle in radians.

This rotates the point (x,y) around the origin to become (x',y'). To rotate around a different point, first translate the point so that the rotation center is the origin, and then translate back again.

For 3D, you can rotate around the 3 axes by using (x,y), (x,z) or (y,z) as the coordinates in the formula above.

UnConeD is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Visualizations > AVS > AVS Presets

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump