xxxxxxxxxx
// sin, cos, rotate, ellipse, generative
float rad, amp, x, y, incr, posX, h, n1, n2;
void setup() {
colorMode(HSB, 360, 100, 100, 100);
size(1200, 300);
background(0);
strokeWeight(.1);
noFill();
incr = TWO_PI/600;
posX = -100;
h = random(20, 340);
n1 = random(.5, 4.5);
n2 = random(12, 18);
}
void draw() {
posX += .5;
translate(posX, height/2);
rotate(sin(frameCount* .005) * .9);
if ( posX < width + 150) {
for (float ang = 0; ang < TWO_PI; ang += incr) {
x = (rad + amp * sin(5*ang)) *cos(ang) ;
y = (rad + amp * cos(n1*ang)) *sin(ang);
stroke(h + sin(ang*3)*20, 100, 100);
ellipse(x, y, .5, .5);
}
}
amp = sin(frameCount* .01) * n2;
rad = 80 + sin(frameCount* .016) * 10;
}