Skip to content

Instantly share code, notes, and snippets.

@dyln
Created February 26, 2016 14:07
Show Gist options
  • Select an option

  • Save dyln/e4e7ee07b53ce27acd0e to your computer and use it in GitHub Desktop.

Select an option

Save dyln/e4e7ee07b53ce27acd0e to your computer and use it in GitHub Desktop.
vcd293 intro
void setup(){
size(800,600);
background(255);
}
void draw(){
noStroke();
fill(0);
//triangle(30, 80, 30, 20, 86, 50);
scale(1.115);
int sp=185;
//first row
pushMatrix();
for(int i=0; i<11;i++){
triangle(30, 80, 30, 20, 86, 50);
translate(56, 0);
}
popMatrix();
rect(645, 20, 60, 60);
//second row
pushMatrix();
for(int i=0; i<11;i++){
triangle(30, sp+80, 30, sp+20, 86, sp+50);
translate(56, 0);
}
popMatrix();
rect(645, sp+20, 60, 60);
//third row
pushMatrix();
for(int i=0; i<11;i++){
triangle(30, 2*sp+80, 30, 2*sp+20, 86, 2*sp+50);
translate(56, 0);
}
popMatrix();
rect(645, 2*sp+20, 60, 60);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment