<p>Let's take a look at the rules for generating the P3 tiling, from the great <a href="https://tilings.math.uni-bielefeld.de/substitution/penrose-rhomb/" rel="nofollow noreferrer">Tilings Encyclopedia</a>:</p>
<p><a href="https://i.sstatic.net/n1PEr.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/n1PEr.png" alt="Subdivision rules for the Penrose P3 tiling" /></a></p>
<p>Let's put the reference point for these rhombs at the bottom of each, pointing up.</p>
<p>The fat rhomb has four children. We can place the lower two on each side (one fat, one thin) together, as their reference points coincide. On the left:</p>
<pre><code>+ to align us to the left edge of the old rhomb
F to move us to the left point of the old rhomb
-- to point us up and to the right
B to place the thin rhomb
--- to point us down and to the right
A to place the fat rhomb
</code></pre>
<p>On the right is the same, with left and right reversed.</p>
<p>Finally, we place the top child by moving up the sides. The final production for the fat rhomb is something like</p>
<pre><code>A --&gt; [ + F -- B --- A ] [ - F ++ B +++ A ] [ - F ++ F ++++ A ]
</code></pre>
<p>The thin rhomb has four children, with three different reference points. We can place the fat child on the left with</p>
<pre><code>++ to align with the left edge
F  to move to the left point
-----  to turn around
A  to place the rhomb
</code></pre>
<p>The fat child on the right is symmetrical. The two thin children share a reference point, so we can do them together:</p>
<pre><code>++ to align with the bottom left edge
F  to move to the left point
---- to align with the top left edge
F  to move to the top point
- to align with the top right edge
B  to place the thin rhomb
---- to align with the top left edge
B to place the second thin rhomb
</code></pre>
<p>The second production is then</p>
<pre><code>B --&gt; [ ++ F ----- A ] [ -- F +++++ A ] [ ++ F ---- F - B ---- B ]
</code></pre>
<p>Hopefully you can see how this works in general. We choose a reference point on the predecessor; then the production moves from that point to the reference points on each successor, aligns correctly, and places the successor.</p>

CC BY-SA 4.0
2024-02-06T14:43:17.130Z
2024-02-06T14:43:17.130Z
gilgamec
<p>I am trying to write an L-System to generate the Penrose P3 tiling (with thin and thick rhombi, I will call them Rhombus-A and Rhombus-B.</p>
<p>For render, I am planning to use the following chars.</p>
<ul>
<li>'+' means rotate counter-clockwise TWO_PI/10</li>
<li>'-' means rotate clockwise TWO_PI/10</li>
<li>'A' means draw Rhombus-A</li>
<li>'B' means draw Rhombus-B</li>
<li>'[' push transformation matrix</li>
<li>']' pop transformation matrix</li>
</ul>
<p>And my question is what would the L-System be to generate an Penrose P3 tiling?</p>
<p>Any re</p>

<algorithm>
L-System to generate the Penrose P3 tiling
Ouss
# L-System to generate the Penrose P3 tiling

(Asked by: username_0 on 2024-02-06)

I am trying to write an L-System to generate the Penrose P3 tiling (with thin and thick rhombi, I will call them Rhombus-A and Rhombus-B.

For render, I am planning to use the following chars.

* '+' means rotate counter-clockwise TWO\_PI/10
* '-' means rotate clockwise TWO\_PI/10
* 'A' means draw Rhombus-A
* 'B' means draw Rhombus-B
* '[' push transformation matrix
* ']' pop transformation matrix

And my question is what would the L-System be to generate an Penrose P3 tiling?

Any re

**Tags:** algorithm


---

## 1 answers

### Answer by username_1 on 2024-02-06. Score: 2

Let's take a look at the rules for generating the P3 tiling, from the great [Tilings Encyclopedia](https://tilings.math.uni-bielefeld.de/substitution/penrose-rhomb/):

[![Subdivision rules for the Penrose P3 tiling](https://i.sstatic.net/n1PEr.png)](https://i.sstatic.net/n1PEr.png)

Let's put the reference point for these rhombs at the bottom of each, pointing up.

The fat rhomb has four children. We can place the lower two on each side (one fat, one thin) together, as their reference points coincide. On the left:

```
+ to align us to the left edge of the old rhomb
F to move us to the left point of the old rhomb
-- to point us up and to the right
B to place the thin rhomb
--- to point us down and to the right
A to place the fat rhomb

```

On the right is the same, with left and right reversed.

Finally, we place the top child by moving up the sides. The final production for the fat rhomb is something like

```
A --> [ + F -- B --- A ] [ - F ++ B +++ A ] [ - F ++ F ++++ A ]

```

The thin rhomb has four children, with three different reference points. We can place the fat child on the left with

```
++ to align with the left edge
F  to move to the left point
-----  to turn around
A  to place the rhomb

```

The fat child on the right is symmetrical. The two thin children share a reference point, so we can do them together:

```
++ to align with the bottom left edge
F  to move to the left point
---- to align with the top left edge
F  to move to the top point
- to align with the top right edge
B  to place the thin rhomb
---- to align with the top left edge
B to place the second thin rhomb

```

The second production is then

```
B --> [ ++ F ----- A ] [ -- F +++++ A ] [ ++ F ---- F - B ---- B ]

```

Hopefully you can see how this works in general. We choose a reference point on the predecessor; then the production moves from that point to the reference points on each successor, aligns correctly, and places the successor.


---

