Created
May 12, 2015 01:51
-
-
Save clavis-magna/205336c1057627ad4c18 to your computer and use it in GitHub Desktop.
a basic function
This file contains 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
int rot = 0; | |
void setup(){ | |
size(500,500); | |
} | |
void draw(){ | |
background(255); | |
pushMatrix(); | |
rot = rot + 5; | |
translate(100,100); | |
rotate(radians(rot)); | |
makeShape(); | |
popMatrix(); | |
pushMatrix(); | |
translate(200,200); | |
makeShape(); | |
popMatrix(); | |
} | |
void makeShape(){ | |
noFill(); | |
ellipse(15,15,10,10); | |
rect(-30,-30,60,60); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment