function setup() { createCanvas(600,600); fill(0, 0, 0); //Draw a volcano triangle(180, 600, 280, 500, 280, 600); triangle(320, 600, 320, 500, 420, 600); //Draw a neutral buoyancy line line(0, 300, 600, 300); //Define starting x,y coordinates of ash x = width / 2; y = height; } function draw() { // Draw a piece of ash stroke(50); fill(100); rect(x, y, 5, 5); // Moving up at a constant speed y = y - 1; // Horizontal movement at neutral buoyancy if (y < 300) { x = x + 1; y = 300; } }