Old 15th November 2005, 04:54   #1
woodman650
Junior Member
 
Join Date: Sep 2004
Posts: 33
Helping Editing AVS - Seismogrid

Hey all,
I'm just wondering if anyone is familiar with this AVS preset and if they might be able to help me out. the camera darts around the grid erradicly and I'm wondering if there is an easy way to just have the camera rotate around the grid instead. the code for rotation is something like this:

oz=-(sin(t)*cos(-t*.41)*sin(cos(1+t*.631)));
ot=.3+1.9/sqrt(sqr(ox)+sqr(oy)+sqr(oz));
ox=ox*ot;oy=oy*ot-.2;oz=oz*ot;
oy=sqrt(abs(oy))*sign(oy);
oy=sqrt(abs(oy))*sign(oy);
ry=atan2(-ox,oz);
rx=-atan2(oy,sqrt(sqr(ox)+sqr(oz)));

cx=cos(rx);sx=sin(rx);
cy=cos(ry);sy=sin(ry);

reg30=ox;
reg31=oy;
reg32=oz;

reg40=cx;
reg41=sx;
reg42=cy;
reg43=sy;

reg50=w/h;
reg51=h/w;

reg99=reg99+sin(rt-reg99)*.1;


I have no idea what is going on here. haha, any help would be awesome! thanks
woodman650 is offline   Reply With Quote
Old 28th November 2005, 20:48   #2
jheriko
Forum King
 
jheriko's Avatar
 
Join Date: Aug 2002
Location: a twist in the fabric of space
Posts: 2,150
Send a message via ICQ to jheriko
ox oy oz are the camera position. rx ry rz are their rotation.

here ry and rx are worked out from the camera position so that they always look to the middle...

some of it is a bit hax:

ot=.3+1.9/sqrt(sqr(ox)+sqr(oy)+sqr(oz));
ox=ox*ot;oy=oy*ot-.2;oz=oz*ot;

i'm not 100% but i think he is just biasing the normalisation so the camera ends up in more favorable places


if that didnt help, search and deduce....

btw, its always good to start simple. if you cant get how that works from looking at it you probably dont know enough to do anything constructive with it...

-- Jheriko

'Everything around us can be represented and understood through numbers'
jheriko is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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