xxxxxxxxxx
// tweak of sketch 208355 "math_art05"
// parametric, sin, cos, pow, rect, ellipse, map, frameCount
// mouseX adjusts the rendering.
float x, y, t, p, incr = .027;
void setup() {
size(550, 450);
background(0);
}
void draw() {
fill(0, 50);
stroke(100);
rect(0, 0, width-1, height-1);
translate(width/2, height/2);
noStroke();
fill(255, 40);
for (int j = 0; j < 8; j++) {
rotate(TWO_PI*(j*0.125));
for (int i = 0; i < 800; i++) {
x = 100 * sin(p * t/2)/pow(sin(t), 2);
y = 100 * cos(t) * pow(cos(p * t), 4);
ellipse(x, y, 3, 3);
t += incr ;
if (t >= 2) t = -2;
}
}
p = sin(frameCount *.01) * 5.05;
incr = map(mouseX, 0, width, .004, .05);
}