1
$\begingroup$

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

$\endgroup$

1 Answer 1

2
$\begingroup$

Let's take a look at the rules for generating the P3 tiling, from the great Tilings Encyclopedia:

Subdivision rules for the Penrose P3 tiling

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.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.