Skip to content

Instantly share code, notes, and snippets.

Created August 30, 2017 01:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/c2aef9e3c4d5b13869025575a82f89ad to your computer and use it in GitHub Desktop.
Save anonymous/c2aef9e3c4d5b13869025575a82f89ad to your computer and use it in GitHub Desktop.
drawing inside squares
//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