Skip to content

Instantly share code, notes, and snippets.

@clavis-magna
Created May 12, 2015 01:51
Show Gist options
  • Save clavis-magna/205336c1057627ad4c18 to your computer and use it in GitHub Desktop.
Save clavis-magna/205336c1057627ad4c18 to your computer and use it in GitHub Desktop.
a basic function
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