Main index | Other Papers index | About author |

*Julian D. A. Wiseman*

**Contents:** Publication history;
Introduction;
The code and its output;
The Algorithm. Also see the
PostScript program itself and the PDF file generated therefrom.

**Publication history:** only at www.jdawiseman.com/papers/trivia/penrose_tiling.html.
Usual disclaimer and copyright terms apply.

A Penrose tiling is described by Wikipedia as being “a nonperiodic tiling generated by an aperiodic set of prototiles named after Sir Roger Penrose”. In 1997 the author tiled his roof terrace with a Penrose tiling of rhombi, and, to guide the laying of the tiles, needed to generate a picture. The code that made the picture, somewhat tidied, is published at www.jdawiseman.com/papers/trivia/penrose_tiling.ps.

A PostScript program recursively generates the tiling, starting with one thin tile.
The code has been used to produce a PDF file,
showing the starting step and each subsequent step.
Unfortunately PostScript limits the size of an array and of the stack to 2^{16}–1 items,
so the PostScript as written cannot further recurse.

The number of rhombi in each step of the recursion, expressed as *Fats* + *Thins* = *Total*, is:
0 + 1 = 1;
2 + 2 = 4;
7 + 5 = 12;
20 + 10 = 30;
48 + 31 = 79;
126 + 80 = 206;
331 + 201 = 532;
864 + 537 = 1401;
2249 + 1386 = 3635;
5880 + 3650 = 9530;
15374 + 9500 = 24874;
40211 + 24821 = 65032.
The output from the last of these steps should be sufficient for most practical purposes.

In the limit there are (1+√5)/2 ≈ 1.618 times as many fats as thins, each of which has an area bigger by the same ratio, so the fats become (5+√5)/10 ≈ 72.36% of the area, and the thins (5–√5)/10 ≈ 27.639%.

If the sides have unit length, the thins have area Sin[36°] = √((5-√5)/8) ≈ 0.587785; and the fats have area Sin[72°] = √((5+√5)/8) ≈ 0.9510565. So the average area is ½√(25-10√5) ≈ 0.81229924. So for a very large area, in which border tiny relative to non-border, the number of tiles is, approximately, the area in square units × 1.231.

At each recursion thin rhombi are replaced with two fats and two thins,
and fat rhombi replaced with three fats and two thins.
Then duplicate rhombi and those off the page are removed, to prevent purposeless growth in the size of the PDF file, and to allow extra recursions before reaching PostScript implementation limits.
To facilitate swift finding of duplicates, the rhombi are kept in order on the stack,
new non-duplicates being `roll`ed into place.
This sorting reduces run time from about O(*n*²) to O(*n* Ln[*n*]);
and also causes the rhombi to be drawn on the page in order, top first to bottom last.

The painting of the rhombi is done in two passes, first an `execform` of the fat rhombi, then an `execform` of the thins.
In some picture editing programs this simplifies selection of all the rhombi of one type.
The immediately following page uses the same data, but instead of rendering the outside of the rhombi, shown are small arcs within.
In any event, it is not difficult to alter the PostScript program to change the colours.

— Julian D. A. WisemanMar 2010, Jan 2015, Nov 2017, and Aug 2018 www.jdawiseman.com |

On 15^{th} January 2015 an email was received from Maarten van Tol, saying that
“… *I wanted to create a Penrose floor in wood in my home. The floor is currently in final stages of construction, attached pics give an impression.*”

Thank you for sending the report: one of the pictures is on the right.

On 6 November 2017 in the *Financial Times* was an article London mayor unveils plans for traffic-free Oxford Street, below which I commented:

And do something witty with the ground: a very long Penrose tiling, the tiles’ sides being of length about a metre. Continue the tiling over the traffic cross routes, faded if necessary, so that it is continuous and unbroken.

It would attract both geeky and non-geeky tourists. www.jdawiseman.com/papers/trivia/penrose_tiling.html

Perhaps brightly coloured.

Readers are invited to support this proposal in whichever way they think most suitable.

Main index | Top | About author |