Random Square Grids
Initially started as a study on how to implement simple concepts in both Python and Processing and finding out in which programming language such simple projects could be realized quicker, this study about random square grids quickly turned into something with its own beauty and complexity.
Pseudocode
- choose a number n and divide your canvas width by it. This is your number of squares per canvas width.
- chose a number m of iterations for the vertical axis.
- for each i in (0..n) draw a square with center point (x0, y0) and corners defined by (canvas/n)/2 minus grid spacing (spc).
- for j in (0..m) copy the parent square drawn in 3) and distort each corner and the center point by a certain random range.
- set the suare drawn in 4) as parent square as long as j <= m; j++.
- repeat steps 4-5.
- i++; go to 3) and draw the next square.
A First Simple Implementation

A Happy Accident
Playing around with the algorithm and its setting I accidentially added an additional loop level which turned the thing into something more interesting.

«
Random Walks from Shapes: Circles