Created
October 3, 2017 18:55
-
-
Save carlybrown18/af649064518104e72e732d9e65dd33a4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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