Created
March 3, 2012 20:20
-
-
Save resophonic/1967998 to your computer and use it in GitHub Desktop.
spinningshapes_expectationv1
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
void setup() | |
{ | |
size(500, 500); | |
frameRate(30); | |
smooth(); | |
} | |
void draw() | |
{ | |
background(255); | |
tri(100,20); | |
tri(95,20); | |
tri(90,20); | |
tri(85,20); | |
tri(80,20); | |
tri(75,20); | |
tri(70,20); | |
tri(65,20); | |
tri(60,20); | |
tri(55,20); | |
tri(50,20); | |
tri(45,20); | |
tri(40,20); | |
tri(35,20); | |
tri(30,20); | |
tri(25,20); | |
tri(20,20); | |
tri(15,20); | |
tri(10,20); | |
tri(5,20); | |
tri2(100,20); | |
tri2(95,20); | |
tri2(90,20); | |
tri2(85,20); | |
tri2(80,20); | |
tri2(75,20); | |
tri2(70,20); | |
tri2(65,20); | |
tri2(60,20); | |
tri2(55,20); | |
tri2(50,20); | |
tri2(45,20); | |
tri2(40,20); | |
tri2(35,20); | |
tri2(30,20); | |
tri2(25,20); | |
tri2(20,20); | |
tri2(15,20); | |
tri2(10,20); | |
tri2(5,20); | |
tri3(100,20); | |
tri3(95,20); | |
tri3(90,20); | |
tri3(85,20); | |
tri3(80,20); | |
tri3(75,20); | |
tri3(70,20); | |
tri3(65,20); | |
tri3(60,20); | |
tri3(55,20); | |
tri3(50,20); | |
tri3(45,20); | |
tri3(40,20); | |
tri3(35,20); | |
tri3(30,20); | |
tri3(25,20); | |
tri3(20,20); | |
tri3(15,20); | |
tri3(10,20); | |
tri3(5,20); | |
tri4(100,20); | |
tri4(95,20); | |
tri4(90,20); | |
tri4(85,20); | |
tri4(80,20); | |
tri4(75,20); | |
tri4(70,20); | |
tri4(65,20); | |
tri4(60,20); | |
tri4(55,20); | |
tri4(50,20); | |
tri4(45,20); | |
tri4(40,20); | |
tri4(35,20); | |
tri4(30,20); | |
tri4(25,20); | |
tri4(20,20); | |
tri4(15,20); | |
tri4(10,20); | |
tri4(5,20); | |
} | |
void tri(int s,int r) { | |
noFill(); | |
stroke(193,165,60); | |
pushMatrix(); | |
translate(width/2,height/2); | |
rotate(frameCount*radians(s)/r); | |
translate(0, -60); | |
triangle(-180, 180, 0, -180, 180, 180); | |
popMatrix(); | |
} | |
void tri2(int s,int r) { | |
noFill(); | |
stroke(129,22,22); | |
pushMatrix(); | |
translate(width/2,height/2); | |
rotate(frameCount*radians(s)/r); | |
translate(0, -80); | |
triangle(-60, 60, 0, -60, 60, 60); | |
popMatrix(); | |
} | |
void tri3(int s,int r) { | |
noFill(); | |
stroke(129,22,22); | |
pushMatrix(); | |
translate(width/2,height/2); | |
rotate(frameCount*radians(s)/r); | |
translate(0, -200); | |
ellipse(-20,20,-20, 20); | |
popMatrix(); | |
} | |
void tri4(int s,int r) { | |
noFill(); | |
stroke(129,22,22); | |
pushMatrix(); | |
translate(width/2,height/2); | |
rotate(frameCount*radians(s)/r); | |
translate(0, -250); | |
ellipse(-10,10,-10, 10); | |
popMatrix(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment