xxxxxxxxxx
//variabili
let posx, posy; // posizione
let vx, vy; // velocitá
let t, dt; // tempo
function setup(){
createCanvas(windowWidth, windowHeight);
background(255);
t = 0;
dt = 2;
posx = 150;
posy = 150;
vx = 2;
vy = 0.5;
}
function draw(){
background(255);
fill(52, 164, 235);
ellipse(posx, posy, 50, 50);
textSize(20);
text("valore del tempo="+t, 15, 25);
posx = posx + vx*dt;
posy = posy + vy*dt;
t = t + dt
}