# Aperiodic Tilings using de Bruijn's Algebraic Approach

This script draws rhombus tilings using de Bruijn’s dual grid approach as descripted in his paper

Algebraic theory of Penrose’s non-periodic tilings of the plane.

There is also a clean introduction to this method in the book

Aperiodic order, Volume 1: A mathematical invitation. Encyclopedia of mathematics and its applications, vol 149.

These tilings are called “aperiodic” in that

- They have no translational symmetry.
- Any finite region (patch) in a tiling appears infinitely many times in that tiling.

**Requirements**:

`numpy`

and`cairocffi`

.- The free raytracer
`POV-Ray`

(optional).

### Examples

A random pentagrid pattern:

The

`Ammann-Beenker`

pattern (put`DIMENSION=4`

in the code):A rhombus tiling using 10 grids:

A tiling exported to

`POV-Ray`

:

### Usage

Run `python debruijn.py`

to generate a 2D image and the data of the tiling, then go to the folder `/povray/`

and run `scene.pov`

with `POV-Ray`

.

There are two parameters that completely determine the tiling: `DIMENSION`

and `SHIFTS`

. For example to draw the classic Penrose tiling `DIMENSION=5`

and `SHIFTS`

can be any 5-tuple that sums to an integer like (0.1, 0.2, 0.3, -0.2, -0.4), but not the degenerate case like (0, 0, 0, 0, 0). If `SHIFTS`

=(0.5, 0.5, 0.5, 0.5, 0.5) then one gets the “anti-penrose” pattern. For `DIMENSION=4`

one gets the famous “Ammann-Beenker” tiling.