I've wanted to learn (more) C for a while and @neauoire's growing collection of small SDL based tools gave me the final push.

Not exactly what I was going for but still pretty

· · Web · 2 · 7 · 26

Always remember to rename variables everywhere they are used...

Show thread

Implemented a drag-and-drop rule editor, similar to the one in "Desert of the Real".

Here I'm dragging patterns and references to rules from the top menu into slots of the first rules.

Each rule has slots for each quadrant and one fallback pattern (on the left) that's used when the squares get too small.

Show thread

Found and imported bitmap files of all the default fill patterns in HyperCard

Show thread

The remaining space on the left had the perfect size to fit in four more rules and now there are hotkeys to invert the colors and to change the rendering resolution.

Show thread

Back to square one, I removed fill patterns because they don't work well when zooming the image.

Combining editor and drawing area was confusing, now the color/rule selector is drawn on top of the quadrant that was clicked in the editor.

Show thread

@neauoire @l3kn
I really want to learn about it in C. Any source code?
I tried Sierpinski's triangle for genetic signature in python

and failed


You can find @neauoire's tools at

I put up my code here:

There are many ways of drawing a Sierpinski triangle, I'm using a technique I call "quadtree grammars".

Let me know if you run into any problems

@neauoire I couldn't have done it without your code as a starting point, especially the drag-and-drop part.

You can clone it from and run it with `make`

Sign in to participate in the conversation

Merveilles is a community project aimed at the establishment of new ways of speaking, seeing and organizing information — A culture that seeks augmentation through the arts of engineering and design. A warm welcome to any like-minded people who feel these ideals resonate with them.