I discovered a simple way to generate assign a "nesting number" for each tile in a Penrose "kites and darts" tiling, which results in a really nice way to visualize the tiling (see image above).
Is there a way to generate this "nesting" number from Ammann bars?
Motivation
I want to draw Penrose tilings on shadertoy.com.
Given a pixel coordinate, I want a simple way to determine information about the tile that the pixel covers. This can be done with recursive substitution, but I want to explore using Ammann bars instead.
Why Ammann bars? Given a pixel, it's straight-forward to determine where it lies relative to the nearest Ammann bars (shown in blue) in each of the 5 directions. And this is enough to draw the image above (the Ammann bars determine exactly where the tiles go).
The kites are drawn in green and the darts are drawn in red or yellow (just depending on angle they point to). But how can the "nesting number" be determined? (I'll post an answer that gives an approximate result)
My process for generating "nesting numbers":
- Start with a half-kite with a "nesting number" of 0
- For the next iteration, substitute each tile as shown here
- Half-kites don't change value (they keep the "nesting number" of the parent tile)
- Half-darts add 1 or -1 to the "nesting number" during even or odd iterations respectively
iteration 0: ("nesting number" is 0)
iteration 1: (bottom-left has "nesting number" of -1)
iteration 2: (bottom-left has "nesting number" of -1, and top has two tiles of 1)
iteration 3:
...
iteration 7:
iteration 8:

you can see iterations 0 through 14 as an animation here.




