x=+ (x=x+1)

x=- (x=x-1)

ellipse(x, y, 50, 50); (x1,y1,w,h)

// Declare and initialise a variable for how fast the circle will travel vertically. let yspeed = 0.01;

image.png

x+=xspeed;

x=x+xspeed

y+=yspeed;

y=y+xspeed

let x; let y;

SAMPLES

How are they related?

image.png

function setup() {
createCanvas(400, 400);
x = 100;
y = height;
}

function draw() {
background(220);

// Draw an ellipse whose position changes over time
// The ellipse moves horizontally with increasing speed
// The ellipse moves vertically with decreasing speed
x *= 1.1;
y *= 0.9;
ellipse(x, y, 50, 50);

x *= 1.1; x=x *1.1 so x become large y = 0.9; y=y 0.9 so y become small

ellipse(x, y, 50, 50);

ellipse(x, y, width, height);