Created
August 31, 2017 01:31
-
-
Save anonymous/777ce364260b2c64cc2de4e0491a9300 to your computer and use it in GitHub Desktop.
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 function will create two squares on top of one another. | |
*The squares will be a random size between 20 and 40 across and downwards. | |
*The squares will be the same colour but at a lower opacity so they can be seen. | |
*They look best when used in a grid with a space of 40 between the largest square that can be generated (40,40) | |
*/ | |
void drawTwoRandomSquares(int across, int down){ | |
noStroke(); | |
fill(random(255), random(255), random (255), 100); | |
rect(across, down , random(20,40) , random(20,40)); | |
rect(across, down, random(20,40), random(20,40)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment