xxxxxxxxxx
17
// Move the mouse from left to right
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
// Draw an ellipse at the center of the screen.
// Relate the width and height of the ellipse to mouseX.
// There is a positive relationship between mouseX and the width of the ellipse. As mouseX increases, so does the width.
// There is a negative relationship between the mouseX and the height of the ellipse. As mouseX increases, the height decreases.
ellipse(width/2, height/2, mouseX, 400-mouseX);
}