Go Back   Winamp Forums > Visualizations > AVS > AVS Troubleshooting

Reply
Thread Tools Search this Thread Display Modes
Old 9th December 2002, 20:17   #1
Clinical
Junior Member
 
Join Date: Nov 2002
Location: somewhere within
Posts: 41
idiot movement question

Just a quickie for anybody that likes answering stupid questions... how do I make something rotate in 2-D? I have a nifty effect that I'm using, and I want it to rotate clockwise, but for some reason (most likely my mathematical ineptitude) I can't figure out how to do it. Could somebody point me in the right direction...? Thanks.
Clinical is offline   Reply With Quote
Old 9th December 2002, 21:06   #2
uNDefineD
Senior Member
 
uNDefineD's Avatar
 
Join Date: Jan 2002
Location: Melbourne, Australia
Posts: 296
Send a message via ICQ to uNDefineD Send a message via AIM to uNDefineD
In a movement, type:

r=r+0.1;

Increase the 0.1 for a faster rotation. Or for more responsiveness, type this in a DM:

init: a=1;
frame: fr=fr+bfr*a;
beat: bfr=rand(10)/100; a=-a;
pixel: r=r+fr;

In pixel, add d=d/1.05 for a bit of zoom.
uNDefineD is offline   Reply With Quote
Old 9th December 2002, 21:09   #3
nixa
Senior Member
 
Join Date: Jul 2002
Posts: 149
If you need a list of effects rotating use a dynamic movement:
frame: t=t+0.05;
pixel: r=r+t;
if you need a super scope rotating add t=t+0.05 to frame and this to end of poind section:
svx=x;x=sin(t)*x+cos(t)*y;y=cos(t)*svx-sin(t)*y;
nixa is offline   Reply With Quote
Old 10th December 2002, 05:48   #4
Jaheckelsafar
Major Dude
 
Join Date: Feb 2002
Location: home
Posts: 1,318
You can also rotate in the cartesian system.

x1=cos(r)*x+sin(r)*y;
y1=-sin(r)*x+cos(r)*y;
x=x1;
y=y1;

It's faster that converting to polar then back (I think).

Stoke me a clipper. I'll be back for Christmas.

- Arnold Rimmer
Red Dwarf
Jaheckelsafar is offline   Reply With Quote
Old 10th December 2002, 05:58   #5
dirkdeftly
Forum King
 
dirkdeftly's Avatar
 
Join Date: Jun 2001
Location: Cydonia, Mars
Posts: 2,651
Send a message via AIM to dirkdeftly
Quicker, but less acurate. The rectangular rotation is ellipsoidal, instead of circular.

"guilt is the cause of more disauders
than history's most obscene marorders" --E. E. Cummings
dirkdeftly is offline   Reply With Quote
Old 10th December 2002, 06:33   #6
Jaheckelsafar
Major Dude
 
Join Date: Feb 2002
Location: home
Posts: 1,318
You can scale the rotation the normal way.

x1=(cos(r)*y+cos(r)*y)*h/w;

Stoke me a clipper. I'll be back for Christmas.

- Arnold Rimmer
Red Dwarf
Jaheckelsafar is offline   Reply With Quote
Old 10th December 2002, 18:33   #7
Clinical
Junior Member
 
Join Date: Nov 2002
Location: somewhere within
Posts: 41
Argh... this is not working out the way I wanted it to... this thing does not rotate well, apparently. Thanks for the help though, I'll keep it in mind next time I want to rotate something.
Clinical is offline   Reply With Quote
Old 11th December 2002, 06:28   #8
Jaheckelsafar
Major Dude
 
Join Date: Feb 2002
Location: home
Posts: 1,318
Post the preset. Let us see the code, maybe we can spot errors.

Stoke me a clipper. I'll be back for Christmas.

- Arnold Rimmer
Red Dwarf
Jaheckelsafar is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Visualizations > AVS > AVS Troubleshooting

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