Keyboard Builders' Digest
Save 5% at Divinikey! Code: KBDNEWS
Keyboard Builders' Digest / Tips & Tricks

Truchet tiles

Random Truchet tiles on your PCB's silk screen.

KBD.news
Published May 1, 2022
Enjoying the content? 54 supporters keep this blog running — Donate like KEEBD, Clacky, and BeaverKeys.

I love stumbling upon topics which lead me to a chain reaction of unexpected discoveries – and ButteredBread5255's post on his Sweep-based split was exactly this kind of submission.

I put some squiggles on the silkscreen to make it look cool – ButteredBread5255.

As it turns out, the author wanted a pattern that felt organic and that you couldn’t tell if it was random or not.

He ended up with (quote) "Truchet tiling of the Rule 30 cellular automata".

This überfancy expression paralyzed my brain for a few seconds but then I turned to Wikipedia as the perpetrator suggested.

Truchet tiles

So Truchet tiles, first described by Sébastien Truchet in 1704, are various square tiles decorated with "patterns that are not rotationally symmetric".

Still too fancy of an explanation? That means simply by rotating them you have a new tile and by arranging them on a plane, they create cool patterns.

The original Truchet tile is simply this one divided into two parts along the diagonal. Rotating this results in four different tiles/orientations:

Pic: A pattern based on the original (diagonal) 4-state Truchet tile

A pattern based on the original (diagonal) 4-state Truchet tile

The quarter-cirlce one on ButteredBread's PCB (below) was popularized by Cyril Stanley Smith (1987). It has only two "states" but can create spectacular patterns.

Pic: Quarter-circle Truchet pattern

Quarter-circle Truchet pattern

So filling an area with these tiles, oriented randomly, results in cool patters. But ButteredBread took it to the next level by applying the rules of #30 cellular automaton to make his Truchet tiles more organic.

Cellular automata

A cellular automaton is an iterative array, a set of cells (e.g. pixels or tiles) with on/off states (or orientations), their neighborhood, and a ruleset to generate the next iteration.

A new generation is created (advancing t by 1), according to some fixed rule (generally, a mathematical function) that determines the new state of each cell in terms of the current state of the cell and the states of the cells in its neighborhood.

A good example is Conway's Game of Life.

Cellular automata can work in any dimensions, but one-dimensional cellular automata are especially great because they can easily be represented visually as an image: e.g. each line is a consecutive generation of a cellular automaton (source). And Stephen Wolfram, British-American computer scientist, has researched exactly this field for decades: one-dimensional cellular automata.

The color of a cell is defined by the color of that cell and its immediate neighbors. There turn out to be a total of 256 possible sets of rules and these choices are numbered from 0 to 255.

Rule 30 cellular automaton

Many of the rules generate meh images, but even though all the rules are very simple, some of them show remarkably complex behavior.

The first in the list that does that is rule 30 – Wolfram's favorite example:

Pic: The first 256 generations of the Rule 30 cellular automaton

The first 256 generations of the Rule 30 cellular automaton

(Wikipedia page)

Others may be fascinated by it too because there are even buildings decorated with the rule 30 pattern.

How to reconstruct the pattern

Unfortunately, I wasn't able to contact ButteredBread, but here is his workflow according to the original post:

I wrote a program in JavaScript to make the pattern, imported it into Inkscape to rotate and position it, then exported it from Inkscape and imported it into Kicad – ButteredBread5255.

Well, there are plenty of Truchet tile generators out there. They won't generate the tiles according to cellular automata but spicing it up with pretty much any randomization method may result in similarly cool patterns.

I made a quick and dirty Truchet generator for myself but it has to be cleaned up before publishing.

Finally, a similar concept with a one-liner: “10 PRINT CHR$(205.5+RND(1)); : GOTO 10” – and this is arguably one of the nerdiest book titles ever.

Do you like this post? Share, donate, subscribe, tip me off!

Published on Sun 1st May 2022. Featured in KBD #76.


Related

Mason60 - Art Series

Sneak peek into how the Mason60 keyboard cases and wrist rests are made.

Inflated keycaps

You can air-type on these inflated keycaps by Running Guy Studio.

Brazen Studio's keyboard cases

Brazen Studio's Ian published some photos of their experimental gypsum/resin and cement/resin cases.

Leather keycaps

Ataruno is working on various keycaps made of leather.

The van erGogh must be a joke

When one form of stagger simply isn't enough the van erGogh comes to the rescue. Committed by KnoblesseOblige.

×
top