Blog about (Web-) Programming, Graphics and Games.


Canvas experiment: Penrose Tiling

I experimented with an algorithm which generates a penrose tiling. This pattern consists of 2 tiles: and is non-periodic (never repeats itself).

►Start demo

The current algorithm is still suboptimal, there remain gaps in the pattern. The algorithm works as follows: Before a tile is added, the local neighborhood is checked for upcoming conflicts. Since only a local environment is checked, there can still emerge conflicts (gaps) for the global pattern. To improve the algorithm, one could introduce heuristics or make it interactive: a user could remove pattern areas which contain gaps. Then the generating could be restarted in this areas. (The demo is inspired by an article in the journal Spektrum d.W.)