xxxxxxxxxx
x = 200;
y = 200;
c = 0;
sp = 10;
function setup() {
createCanvas(400, 400);
strokeWeight(2);
}
function draw() {
background(0);
t = millis()/10000;
x = width/16*cos(2*PI*t)
y = height/16*sin(2*PI*t)
// if(x > width) sp = -abs(sp);
// if(x < 0) sp = abs(sp)
c = c+5
fill(abs(x%255))
stroke(abs(x%255))
circle(x+width/2, y+height/2, 100);//内側の円
fill(255)
stroke(255)
circle(x+width/2, y+height/2, 40);//内側の円上の白い円
x = width/4*cos(2*PI*t)
y = height/4*sin(2*PI*t)
// if(x > width) sp = -abs(sp);
// if(x < 0) sp = abs(sp)
c = c+5
fill(abs(x%255))
stroke(abs(x%255))
circle(x+width/2, y+height/2, 100);//真ん中の円
fill(255)
stroke(255)
circle(x+width/2, y+height/2, 40);//真ん中の円上の白い円
x = width/2*cos(2*PI*t)
y = height/2*sin(2*PI*t)
// if(x > width) sp = -abs(sp);
// if(x < 0) sp = abs(sp)
c = c+5
fill(abs(x%255))
stroke(abs(x%255))
circle(x+width/2, y+height/2, 100);//外側の円
fill(255)
stroke(255)
circle(x+width/2, y+height/2, 40);//外側の円上の白い円
}