See Onoda, Steinhardt, DiVincenzo and Socolar in Phys. Rev. Lett. 60, #25, 1988 or Strandburg in Computers in Physics, Sep/Oct 1991.
This implementation uses the simpler version of the growth algorithm, i.e., if there are no forced vertices, a randomly chosen tile is added to a randomly chosen vertex (no preference for those 108 degree angles).
There are two essential differences to the algorithm presented in the literature: First, we do not allow the tiling to enclose an untiled area. Whenever this is in danger of happening, we just do not add the tile, hoping for a better random choice the next time. Second, when choosing a vertex randomly, we will take one that lies withing the viewport if available. If this seems to cause enclosures in the forced rule case, we will allow invisible vertices to be chosen.
Tiling is restarted whenever one of the following happens: there are no incomplete vertices within the viewport or the tiling has extended a window's length beyond the edge of the window horizontally or vertically or forced rule choice has failed 100 times due to areas about to become enclosed.
Although quasiperiodic tilings are produced, the tiles themselves are not penrose tiles (darts and kites). In contrast to penrose tiles, these tiles can be arranged to form a periodic tiling.
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation.
Ability to run standalone or with xscreensaver added by Jamie Zawinski <firstname.lastname@example.org>, 10-May-97.