xxxxxxxxxx
var time = 0;
function setup() {
createCanvas(500, 500);
background(100);
}
function draw() {
//background(0);
fill(0,10);
rect(0,0,width,height);
fill(255);
ellipse(xPos(time), yPos(time), 50, 50);
time = time +1;
}
function xPos(time)
{
return 250 + sin(time/16)*79;
}
function yPos(time)
{
return 250 + cos(time/6)*120;
}