HW a moving ball horizontal

float x= 200;
float y= 200;
float speed = 2;

void setup() {
size(600, 600);
smooth();
}
void draw() {
background(0);
x= x + speed;
ellipse(x, y,50,50);
fill(255,0,0);
}

This entry was posted in Uncategorized. Bookmark the permalink.

One Response to HW a moving ball horizontal

  1. Michael,

    If this is Homework 3.2 then this is not exactly what was assigned. Please consult the page again:

    3.2

Leave a Reply

Your email address will not be published. Required fields are marked *