Skip to content

Instantly share code, notes, and snippets.

@ybakos
Created February 24, 2014 17:19
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 ybakos/9192617 to your computer and use it in GitHub Desktop.
Save ybakos/9192617 to your computer and use it in GitHub Desktop.
// Yong Bakos
// An exploration of functions...
void setup() {
size(400, 400);
}
void draw() {
drawCar(200, 100, 1);
}
void drawCar(int xLoc, int yLoc, int thickness) {
rect(xLoc, yLoc, 100, 20);
rect(xLoc + 30, yLoc - 30, 30, 30);
ellipse(xLoc + 10, yLoc + 20, 10, 10);
ellipse(xLoc + 80, yLoc + 20, 10, 10);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment