xxxxxxxxxx
var sciencesPo = 0;
var speedX = 1;
var speedY = 1;
function setup() {
createCanvas(500, 500);
//background(0);
}
function draw() {
background(0);
ellipse(sciencesPo,250, 100, 100);
if (sciencesPo >= 500 || sciencesPo < 0)
{
speedX = speedX * -1;
}
sciencesPo = sciencesPo + speedX*5;
}