ref: 3f52db33e4aeaeebc4303d15ceb4e17c8651d18b quad/README.md -rw-r--r-- 1.3 KiB
3f52db33 — Leon Rische Use rgb surface for grammar 9 months ago


Sierpinski Triangle


Depends on the sdl2-dev package.

Build with make, run with ./quad.

The default size is 1024 pixels, optimized for 1080x1920px screens. To use another size (ideally a power of two or a number 2^n * m where m is small) run e.g ./quad 512 or ./quad 2048.

Run with make run.


  1. There are 8 rules
  2. Rule 1 (top left) is expended to the image on the right
  3. Rules are referenced by a small squares indicating their position in the editor interface
  4. Each rule has one slot for each quadrant of the image
  5. Each rule has a fallback slot that's used when a square gets too small to be subdivided further
  6. Slots can contain patterns or references to rules, the fallback slot can only contain a pattern
  7. To place a pattern in a slot, click it in the pallette at the top, then click on the slot
  8. To place a reference to a rule in a slot, click on the small square next to it (the larger square region below also works), then click on the slot


  • 1...8 select rule to use for image

  • c clear rules

  • d decrease resolution

  • i increase resolution

  • o toggle outlines

  • v invert colors

  • r save as bitmap (quad-render.bpm)

  • q quit