Skip to content

Cut and project

huacayacauh edited this page Apr 27, 2020 · 4 revisions

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!

References

Short description of the implementation

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...

1. generators_to_grid(G)

Computes the multigrid directions, as lines of the resulting matrix (Array of Array), from Grassmannian coordinates of the tiling slope.

2. dual2(V,S,k)

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

3. cropn(tiles_info,k)

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).

4. draw2(directions,tiles_info)

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).

5. Neighbor discovery

We use findNeighbors from the Substitution API

6. Decorate tiles

Based on the rhomb type (first element of tiles information) we decorate Tiles by setting some .sand value.

Clone this wiki locally