xxxxxxxxxx
40
let angle=0;
function setup() {
createCanvas(640, 640);
stroke(random(0,255),random(0,255),random(0,255),50);
strokeWeight(10);
angleMode(DEGREES);
}
function draw() {
background(0);
translate(width/2, height/2);
myFractals(100);
}
function myFractals(n){
n *= 0.66;
line(0, 0, 0,60);
fill(0);
ellipse(0,0,10,10);
// ellipse(0, 0, 40,70 );
// ellipse(0, 0, second(),second());
translate(0, 40);
if(n > 2){
push();
// rotate(angle);
rotate(mouseX);
myFractals(n);
pop();
push();
// rotate(-angle);
rotate(-mouseX);
myFractals(n);
pop();
}
}