// Funky Caterpillar, by Jeff Osborn (jo009j@mail.rochester.edu)
// This config began as an experiment in the "trwv" command.  Its not my best work, but it looks pretty cool!  It works by generating a series of dots which react to the music.  They "bounce" around the screen, one behind the other, so they appear to be sections of a caterpillar: a _funky_ caterpillar!

NUM="rnd(15) + 10", //Generate a random number of sections, between 10 and 25
Stps=1, // We only need one step, as we're drawing dots.
Aspc=0, // We need to set this to 0 so that the edges of the screen don't exceed 1 or -1; without this, trwv wouldn't work right and the caterpillar wouldn't bounce at the edge of the screen.

A0="t", //Start time
A1="rnd(4) + 6", // Speed of X
A2="rnd(4) + 4", // Speed of Y (SPEEDY...HEE HEE HEE)
A3="rnd(1.9) - 1", //Random starting position for X
A4="rnd(1.9) - 1", //Random starting position for Y

B0="ID / NUM", // Each section has this unique ID.  It helps to offset each one when we draw the sections.
B1="A0 - t - ((B0) / 2)", //Seconds _since_ the beginning, staggered for each section

C0="1.95 * (trwv((B1 / A2) + A3) - 0.5)", // Here we actually draw the caterpillar.  Since trwv only works between 0 and 1, I had to stretch the first quadrant and move it into the middle.  It works, though :-P
C1="1.95 * (trwv((B1 / A1) + A3) - 0.5)",

X0="C0",
Y0="C1",

LWdt="(mag(B0) * 20 * s) + 10", // This makes it funky!!
ConB=1, //There are no lines to connect, as each instance only has one dot.  

Vers=100