Skip to content

Instantly share code, notes, and snippets.

@oguzgelal
Created November 16, 2015 23:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oguzgelal/67cd7cadaff68495caa8 to your computer and use it in GitHub Desktop.
Save oguzgelal/67cd7cadaff68495caa8 to your computer and use it in GitHub Desktop.
// initialize x and y as 0
int x=0;
int y=0;
void setup(){
size(800,600);
background(255); // set background color to white
}
void draw(){
fill(255,0,0); // fill color red
stroke(0,0,255); // stroke color blue
ellipseMode(CENTER); // ref. point to ellipse is its center
ellipse(x, y, 20, 20); // draw the ellipse
// increment x and y
x+=5;
y+=5;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment