Created
November 4, 2015 18:21
-
-
Save radames/f9370a33a5c389d48d97 to your computer and use it in GitHub Desktop.
Just a sketch template with function
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
void setup() { | |
size(800, 500); | |
frameRate(24); | |
} | |
void draw() { | |
background(255); | |
drawRobot(1, 50,50); //calling the function with fixed parameters | |
} | |
//function to draw my shape | |
void drawRobot(int blink, float posx, float posy) { | |
pushMatrix(); | |
//translate to given parameters | |
translate(posx, posy); | |
ellipse(0,0,50,50); | |
ellipse(-10,0,10,10); | |
ellipse(-10,0,3,3); | |
ellipse(10,0,10,10); | |
ellipse(10,0,3,3); | |
arc(0, 10, 20, 20, radians(30),radians(150)); //randians convert degrees | |
popMatrix(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment