SubstitutionTilings.jl Core Definitions

Dilation groups and substitution systems

SubstitutionTilings.CoreDefs.SubSystemType
SubSystem{G, D, L}

The description of a substitution system with coordinates in G, labels of type L and dilation coefficients of type D. G should be a subset of DGroupElem implementing dilate(λ :: D, g :: G).

source
SubstitutionTilings.CoreDefs.autocorrelationMethod

Given a (primitive) substitution system S, some collar initial_collar and some patch patch (both centered at the origin) and some depth depth, calculates the autocorrelation measure of a tiling for all differences between supertiles of depth depth. The values are accurate as long as depth is high enough to force collars. weights(i :: L,g :: G,j :: L) gives the weight used to compute the autocorrelation: by default it is constantly 1

collar_in should be implemented.

source
SubstitutionTilings.CoreDefs.drawFunction
draw(t :: T, action :: Symbol)

T should be a type of prototiles and s should be an action Luxor recognizes when drawing shapes (such as :fill or :stroke). draw(t,s) should then draw some geometric primitives in a Luxor context using the action s.

source
SubstitutionTilings.CoreDefs.drawMethod
draw(t :: Pair{<:DGroupElem, T}, sc, hue, action)

If t is a tile, draw(t, sc, hue, action) draws it using draw(t[1], action) after applying the transformation embed_aff(t[2]) with scale sc, hue hue and action p action.

source
SubstitutionTilings.CoreDefs.embed_affFunction
embed_aff(g)

embed_aff should return the embedding of g as an element of Aff(2). This should be a vector length 6 with the three columns of the augmented matrix of the transformation, ignoring its last row. For example, if g should be embedded as a reflection along the x axis followed by a translation by (1,0), the output should be [1., 0., 0., -1., 1., 0.]. This is the format Luxor uses to represent affine transformations.

source
SubstitutionTilings.CoreDefs.empirical_frequencyMethod
empirical_frequency(patch, tiling)

Computes the empirical relative frequency of patch in the tiling: that is, computes how many translates of patch are subsets of tiling divided by the total amount of tiles in tiling.

source
SubstitutionTilings.CoreDefs.frequencyMethod

Given a (primitive) substitution system S, some collar initial_collar and some patch patch (both centered at the origin) and some depth depth calculates the frequency of patch in S. initial_collar is used to construct a total collaring and doesn't matter as long as it's a legal collar. depth determines how the level at which the frequency is calculated: the result is only exact if depth is high enough, but lower values result in faster computation.

Requires collar_in to be implemented for the given substitution system.

source
SubstitutionTilings.CoreDefs.substituteFunction
substitute(S, tiling, n, [in_bounds, window])

Applies n inflation steps of the tiling: each step dilates the tiling and then substitutes each tile according to the substitution rule of S. This version computes the substitution depth first: this is more efficient unless the substitution rule has lots of overlaps (see substitute_bf)

Optionally, one can filter which tiles are computed by providing in_bounds and window. If provided, in_bounds should be a test function in_bounds(tile, n, window) which recieves a tile, a depth and the supplied window, and outputs whether the tile should be substituted further or discarded. This can be used to greatly reduce compute times when rendering images of tilings.

source
SubstitutionTilings.CoreDefs.total_collaringMethod
total_collaring(S, initial_collar)

Given a (primitive) substitution system S and some collar initial_collar (centered at the origin), construct its total collaring. The result is given as a tuple (collars, Sc) where collars is the list of all collars that happen in S-legal tilings and Sc is the corresponding substitution system, where the labels are integers constituting indexes in collars.

Requires collar_in to be implemented for the given substitution system.

source

Index