Random Squares Remake [Oct. 30, 2017]


I decided to recreate Bill Kolomyjec’s Random Squares from Computer Graphics and Art because I immediately thought of how to create it in code when I saw it. The biggest challenge was figuring out how to create a random number of squares in each larger square and how to create a uniform offset for each set of squares. I overcame this by making clever use of the random() function to create the “odds” of drawing a square inside another. I also used one random() function and a switch statement to determine which corner the squares should lean towards if any.

Picture of Original:

Picture of Remake:



Leave a Reply

Your email address will not be published. Required fields are marked *