xxxxxxxxxx
42
var theta = 0.0;
var circleRadius = 20;
var rotationSpeed = 0.05;
var color_1, color_2;
function setup() {
createCanvas(600,600);
color_1 = color('#FF0000');
color_2 = color('#0000FF');
}
function draw() {
//background(255); //Monstrosity on/off XD
noFill();
strokeWeight(2);
push();
translate(width/2, height/2);
rotate(-theta);
for(i = 0; i < 25; i++){
if(i % 2 == 0) stroke(color_1);
else stroke(color_2);
circle(-50, 0, i*circleRadius);
}
pop();
push();
translate(width/2, height/2);
rotate(theta);
for(i = 0; i < 25; i++){
if(i % 2 == 0) stroke(color_2);
else stroke(color_1);
circle(50, 0, i*circleRadius);
}
pop();
theta += rotationSpeed;
}