Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Declare the x variable here so it can be used
- //it will be used to keep track of the x-position of the ellipse
- int x;
- //This setup function occurs once at the very beginning of the program
- void setup(){
- size(300,300);
- x = 5;
- }
- //This draw function is called many times a second
- void draw(){
- background(0);
- fill(128,128,128);
- ellipse(x, 150, 50, 50);
- x++;
- }
Add Comment
Please, Sign In to add comment