xxxxxxxxxx
float degreesOfRotation = 0;
float counter = 230;
void setup() {
size(500, 800);
//noStroke();
}
void draw() {
background(#1DCEAF);
stroke(174, 148, 208); //purple stroke
// Logic: map(value To Map, current Low , current High, New Low, new High)
// map returns a float
//degreesOfRotation = map(mouseX, 0, width, -10, 10); // remove comments to map degreesOfRotation to mouse Position
counter += .01;
// use sin (or noise) to wiggle the tail constantly
degreesOfRotation = map(sin(counter), -1, 1, -10, 10); //remove comments to get neat movement
//degreesOfRotation = map(noise(counter), 0, 1, -10, 10); //remove comments to get erratic movementn with noise
translate(100, 300);
int numCircs = 36;
//taper each circle so the tail gets smaller towards the end
for (int circCount = 0; circCount < numCircs; circCount++) {
float diam = map(circCount, 0, numCircs, 25, 1);
translate(10, 0);
rotate( radians(degreesOfRotation) );
ellipse(0, 0, diam, diam);
}
}