14th August 2002 01:44 UTC
Weird Rip Report
I have a rather unusual rip report to make... it's about the AVS preset "LazerZ":
http://www.winamp.com/components3/de...onentId=118452
Most people won't know this, but my first AVS pack was a tiny one called "Laser Effects", which was based on a cool laser-like superscope I made. Unfortunately I removed it because it was my first work and not really impressive. I didn't keep the presets either
It seems to me that the scope in the preset above is the one I made. I recognize it can fully explain how it works:
px=r*(2*cos(al)+sin((al+t*2)*m));py=r*(2*sin(al)+cos((al+t*1)*m));
al=i*tpi;r=(i*n%n%8);r=if(equal(r*(b-1),0),0,sh);pz=r*9;a=if(equal(r,0),1,r);x=px*cy+a*sy;y=py*cx+a*sx;
It draws a spirograph shape in (px,py) for the point in angle 'al'. The spirograph shape has a multiplication factor 'm' which changes to provide different shapes (triange, flower, star, ...). This is the projected shape.
To make the beams of the laser, the scope goes back to the center point every 8 points. That's what r is for: a counter. This causes the laser to look like a broken up shape at the edges, where 1/8th of a piece is always missing.
There's an error in the code by the way. The 't*1' on the first line in the py assignment should be 't*2' (like in the px calculation). It doesn't make sense to multiply with 1 anyway.
The code itself is very similar to my scopes. Using rx,ry,rz for rotation angles is nothing special: using 'rxo' as rotation increase offset is something different. I also notice that the code divides by constants rather than multiplying with the reciprocal. This is something I didn't know either at that time, so it's another indication.
There's also something about the cosine/sine calculations. It wraps the angle ry into a folling construct: sin(ry)/4;. This causes the rotation to be limited to 1/4th radians either way which is needed for the laser to point to the camera all the time.
It also uses numerical input of 'pi' (and 'tpi' as two-pi) rather than using acos(-1). My preset was made before tonic started using this technique, but it's very common now.
I'm going to look for my original presets... if I still have it I can confirm this rip, but until them I guess it's just my word against his. I sent him an email asking about the source: if he admits it, it can removed as well. I just think that the preset uses a few antiquated techniques which are well known today to be inefficient.
One explanation I can think of is that the person downloaded my mini pack of laser effects and used it, thinking it was a standard avs preset that came with the download.