~l3kn/quad

Quadtree Grammar Renderer
0a974e48 — Leon Rische 2 days ago
Use clang and enable warnings
62aa9128 — Leon Rische 2 days ago
Add hotkeys for selecting current rule
d8d7b088 — Leon Rische 3 days ago
Improve texture alignment

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~l3kn/quad
read/write
git@git.sr.ht:~l3kn/quad

You can also use your local clone with git send-email.

#Quad

Sierpinski Triangle

#Installation

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.

#Interface

  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

#Controls

  • 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