Created
February 26, 2016 14:07
-
-
Save dyln/e4e7ee07b53ce27acd0e to your computer and use it in GitHub Desktop.
vcd293 intro
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,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