git @ Cat's Eye Technologies Gridoggerel / master README.md
master

Tree @master (Download .tar.gz)

README.md @masterview markup · raw · history · blame

Gridoggerel

Try it online @ catseye.tc | See also: Maze CloudsLatcarfKolakoski Kurve

screenshot

This is a gewgaw I came up with in December 2025. You could call it a generative art technique, or you might feel that makes it sound more important than it is, so you could call it a gewgaw.

We have a grid, and a random number of points on this grid. For each point, exactly one of the following two statements is true:

  • there is another point in the same column or in the same row; or
  • there is no point in either the same column or same row.

In the first case, we draw lines that connect to the other points in the same row/column. These lines are necessarily horizontal or vertical.

For a point in the second case, we find the closest other point to it, and draw a line directly to it. These lines are necessarily diagonal.

The user controls how many points are on the grid with a slider control.

It may be surprising to observe how rarely diagonal lines appear. Based on some rough observations, if only 10% of locations are occupied by points (e.g. 40 points in a 20x20 grid), diagonal lines seem to appear in only about half of the generated images. I'm certain a more rigorous analysis could be applied; the basic reason is each point added "fills up" a row and a column, so only a number of points proportional to the width plus the height need to be added, in order to mostly "fill up" the grid.