float A, B, C = .1; int SCALE; float SPEED = 1; void setup() { size(500, 500); frameRate(30); SCALE = int(width / 2.5); stroke(127, 255, 0); noFill(); noStroke(); smooth(); } void draw() { background(0, 63, 63); int W = width / 2, H = height / 2; beginShape(); curveVertex(W + X(0.0), H + Y(0.0)); for (float i = 0.0; i < PI; i += 0.12) { float x = X(i); float y = Y(i); float d = 127 + 127 * sin(i); float r = 8 * (i + 1); stroke(d); curveVertex(W + x, H + y); fill(255, map(i, 0, PI, 0, 127)); ellipse(W + x, H + y, r, r); noFill(); } curveVertex(W + X(PI), H + Y(PI)); endShape(); } float X(float i) { float u = i + radians(frameCount * SPEED); return SCALE * (sin(u) + sin(20 * u) / 10); } float Y(float i) { float u = i + radians(frameCount * SPEED); return SCALE * (cos(u) + cos(20 * u) / 10); }