xxxxxxxxxx
32
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw() {
background(150, 10, 200);
noStroke();
for(var i = 0; i<500; i++){
angleMode(DEGREES);
//rotate(map(i, 0, 100, 0, 10));
rotate(map(sin(frameCount), -1, 1, 0, 2));
if (i % 2 == 0){
fill(50, 100, 255, 50);
ellipse(width/2+i*10,
height/2+i*10,
map(sin(frameCount/10), -1, 1, i*10, 100),
map(sin(frameCount/10), -1, 1, i*10, 100));
} else if (i % 2 == 1){
fill(255, 100, 50, 50);
ellipse(width/2-i*10,
height/2-i*10,
map(sin(frameCount/10), -1, 1, i*10, 100),
map(sin(frameCount/10), -1, 1, i*10, 100));
}
}
}