Skip to content

Instantly share code, notes, and snippets.

@carlybrown18
Created October 3, 2017 18:55
Show Gist options
  • Select an option

  • Save carlybrown18/af649064518104e72e732d9e65dd33a4 to your computer and use it in GitHub Desktop.

Select an option

Save carlybrown18/af649064518104e72e732d9e65dd33a4 to your computer and use it in GitHub Desktop.
function setup() {
createCanvas(600,600);
background(200);
}
function draw() {
legs(180, 400);
body(180, 400);
}
//drawing of legs at point (x,y)
function legs(x,y) {
fill(20, 40, 100);
rect(x, y, 55, 100, 0, 0, 20, 15);
rect(x+100, y, 55, 100, 0, 0, 15, 20);
}
//drawing of body at point (x,y), should match the legs (x,y)
function body(x,y) {
rect(x, y-100, 155, 100, 10, 30, 0, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment