SketchBook

円 色

var x;

function setup() {
createCanvas(300, 300);
background(250, 250, 250);
strokeWeight(3);
x=0
 }

function draw() {
x = x + 1;
background(255,255,255);

if(x<300){
fill(x-5, 0, 255-(x-5));
}
if(x>299){
fill(x-5, x-305, x-305);
}
ellipse(0, 150, x+x);

if(x<300){
fill(255-(x-5), 0, x-5);
}
if(x>299){
fill(x-305, 0, 555-x);
}
ellipse(300, 150, 600-x-x);

line(x, 300, x, 0);

line(300-(x-300), 300, 300-(x-300), 0);

 if(x>601){
x=0;
}
}