Repository navigation
Cut and project
Some of our tilings are generated using the cut and project method, implemented via the dual multigrid method.
See js/TilingPresets/CutAndProjectViaMultigrid.js, translated from a great sagemath/python code by Thomas Fernique. Many thanks to him!
- Thomas Fernique will soon release a document (in French) describing the method, it will be linked here as soon as available.
- Cut and project method on wikiepdia.
- Cut and project on the Tilings Encyclopedia.
- Some detailed notes by Greg Egan.
n -> d: cut an n-dimensional grid and project on a d-dimensional hyperplane.
Some functions, especially draw2, work only when you project on a two-dimensional plane (d=2).
Anyway, we do not intend to implement sandpiles on non-two-dimensional tilings...
Computes the multigrid directions, as lines of the resulting matrix (Array of Array), from Grassmannian coordinates of the tiling slope.
Constructs tiling dual of the multigrid, from
-
V: a n times d matrix (Array of Array) whose lines give the directions -
S: an Array of length n giving the shifts -
k: an integer bounding the absolute value of indices considered for each family of hyperplane
Returns tiles information as an Array of elements [[i,j],[k1,k2,...,kn]]
with [i,j] the rhomb type and kl the index in the l-th direction
i.e., number of lines of type l before the intersection
Crops the tiling (as tiles information) in order to keep only tiles living within the lines of index +-k.
This is based on the second element of tiles informaion Array, which gives the number pos[i] of multigrid lines before the intersection, in each of the n directions (we test whether Math.abs(pos[i]) <= k for all 0 <= i < n).
Returns an Array of Tile Objects corresponding to the projection of tiles information provided in tiles_info,
with directions the n directions of the drawing, intended to be an Array of n couples because we expect d=2 (usually, this also corresponds to the first argument passed to dual2).
We use findNeighbors from the Substitution API
Based on the rhomb type (first element of tiles information) we decorate Tiles by setting some .sand value.