sketch
//Qixin Zhang
// section E
var x = 1
var y = 1
var angle = 0
function setup() {
createCanvas(600,600);
background(0);
}
function draw() {
blendMode(SCREEN);
translate(width/2,height/2);
rotate(radians(angle+1))
//fill(254,32,32);
// noStroke ();
// circle (0,0,1);
if (mouseX <width/2 ) {
x = x+0.3;
y = y+0.3;
angle = angle +22;
fill(255,0,0);
noStroke();
scale(x/50)
rotate(radians(angle));
translate(x,y);
circle (0,0,20);
} else if (mouseX >width/2 ) {
x = x+0.3;
y = y+0.3;
angle = angle -21;
fill(156,0,0);
noStroke();
rotate(radians(angle));
translate(x,y);
circle (0,0,20);
}
}
I am fascinated by the spiral, so i used mouseX and mouseY to control the direction of spinning angle