xxxxxxxxxx
let posx, posy;
let vx, vy;
let t, dt;
let ax, ay;
let r
function setup() {
createCanvas(windowWidth, windowHeight);
background(52, 198, 235);
t = 0;
dt = 3;
posx = 0;
posy = 0;
vx = 3;
vy = 3;
//ax = 3;
//ay = 3;
}
function draw() {
background(52, 198, 235);
strokeWeight(2);
/*if (posx > width) {
posx = 0
}
if (posy > height) {
posy = height
}
fill(255, 229, 59);
circle(posx, posy, 40);*/
if (posx > width) {
posx = 0
}
if (posy > height) {
posy = 0
}
fill(posx, posy, 100);
circle(posx, posy, 30);
//posx = posx + vx * dt + 0.5 * ax * dt ^ 2;
//posy = posy + vy * dt + 0.5 * ay * dt ^ 2;
posx = posx + vx * dt;
posy = posy + vy * dt;
}