Created
August 30, 2017 01:47
-
-
Save anonymous/c2aef9e3c4d5b13869025575a82f89ad to your computer and use it in GitHub Desktop.
drawing inside squares
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
//this is the instructions for the smaller square inside the bigger squares. | |
//translate(x,y) controls the position | |
void drawinsideSquares(int x, int y) { | |
for (int k = 0; k < 3; k = k + 1) { | |
pushMatrix(); | |
noFill(); | |
stroke(255, 255, 255); | |
translate(x + 18, y + 18); | |
float rotation = random(360); | |
rotate(radians(rotation)); | |
rectMode(CENTER); | |
rect (0, 0, 20, 20); | |
popMatrix(); | |
} | |
rectMode(CORNER); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment