xxxxxxxxxx
50
let x1,x2,x3;
let y1,y2;
let s;
function setup() {
createCanvas(400, 400);
x1=width/2;
x2=width/2;
x3=width/2;
y1=height/2
y2=height/2
s=1;
}
function draw() {
background(0);
ellipseMode(CENTER)
//change direction;
x1=x1+s;
x2=x2-s;
x3=x3+(s+10);
y1=y1-s;
y2=y2+s
//circle to right- red
fill(255,0,0)
ellipse(x1,height/2,25,25)
//circle to top right- green
fill(0,255,0)
ellipse(x1,y1,25,25)
//circle to top left- purple
fill(164,106,252)
ellipse(x2,y1,25,25)
//circle to bottom right- yellow
fill(252,247,106)
ellipse(x1,y2,25,25)
//circle to bottom left- pink
fill(252,106,247)
ellipse(x2,y2,25,25)
//circle that moves 10 time faster-blue
fill(106,252,223)
ellipse(x3,y2,25,25)
}