xxxxxxxxxx
41
let a = 50;
function setup() {
createCanvas(600, 500);
// noLoop();
}
function draw() {
background(255);
// try noStroke(),20,10,5,100,80
// animate alpha of stroke?
stroke(0, 60);
// noStroke();
recursion01(width / 2 - 100, height / 2, 15);
// a -= 2;
}
function recursion01(x, y, s) {
// try 25,50,100
if (s < 100) {
// try b 200,20,170,0
fill(130, 130, 130, 45);
ellipse(x, y, s);
fill(0, 230, 20, 35);
ellipse(x + s * 1.5, y, s * 1.5);
fill(30, 0, 210, 10);
ellipse(x + s * 3, y, s);
ellipse(x + s * 4.5, y, s);
ellipse(x + s * 6, y, s * 0.75);
// try 8,4
// try cos 25, 15, 75
let x1 = x + 4 * s * cos(75 * s);
let y1 = y + 4 * s * sin(75 * s);
s = s + 0.1;
recursion01(x1, y1, s);
}
}