This project is based on a system of thresholds and minimum distances to create shapes. The sketch is populated with random points at its start, including completely random points and others that form the four corners of the cells of one or more (modular) grids.
Once all these points are placed, the program selects the closest ones to each other in groups of 3 to 5, based on a minimum distance. These polygons will later be filled with hatching.
Once the program has determined a certain number of groups/polygons, it will use a slightly higher threshold than the first one to connect points between the different polygons (lighter color).
A third threshold comes into play, allowing the selection of points closer to the edges of the composition. The program will draw lines from these points to connect them to the boundaries of the composition.
PNG & SVG
By clicking in the composition (in live mode), two buttons should be displayed to obtain a PNG or SVG. You can also use the [d] key for PNG and the [p] key for SVG.
You can plot your output with your own plotter. The SVG is optimized for Inkscape, and contains two layers for each of the colors in the composition. Because of the large number of lines Suspended polygons can contain, I recommend that you set the "plot optimization" option to "Full; Also allow path reversal", otherwise you risk damaging the paper.
Created with typescript
Nicolas Lebrun @nclslbrn nicolas-lebrun.fr