View on GitHub

prototile

Prototile generates self-similar substitution tilings based on squares of different colors.

prototile-js

Try out the Prototile tiling generator!

Prototile generates self-similar substitution tilings based on squares of different colors. At each iteration, each square of the existing tiling is replaced by a set of squares (here called a substitution tile) based on the color of the original square. For iteration 0, an initial set of squares must be specified.

Additional information about substitution tilings can be found on Wikipedia and on Dr. Natalie Priebe Frank’s tiling page, which also features a Matlab-based relative of Prototile.

Prototile uses D3 to bind the tilings it creates to objects in an HTML document. Voronoi diagrams of tilings are generated by the d3-voronoi library.

Instructions

Tiling Parameters

Form Parameter URL Parameter Description
# Colors numColors The number of colors. For more than two colors, additional colors will be interpolated between the min color value and the max color value.
Initial Size initialSize The number of rows and columns in the initial tiling.
Square Size squareSize The width and height of each square in pixels.
# Iterations iterations The number of substitution iterations. At each iteration, each square will be replaced by a substitution tile defined in the Substitutions section. Beware that increasing the number of iterations increases the size of the tiling exponentially.
Substitution Size substSize The number of rows and columns in each substitution tile.
Transparency transparency The transparency of the colors used in the main tiling. This is used when a copy of the main tiling is shifted over the main tiling to produce interesting patterns. Set to 1 for no transparency.
Min Color minColor The minimum color (default white). As a URL parameter (and in Safari), this is represented as a # (encoded as %23) followed by 6 hexadecimal digits.
Max Color maxColor The maximum color (default black). As a URL parameter (and in Safari), this is represented as a # (encoded as %23) followed by 6 hexadecimal digits.
Offset Row offsetRow The row offset of the copy tiling displayed over the main tiling. The upper left square of the copy tiling will be placed on this row of the main tiling. Half steps between 0 and the tiling height are supported.
Offset Column offsetColumn The column offset of the copy tiling displayed over the main tiling. The upper left square of the copy tiling will be placed on this column of the main tiling. Half steps between 0 and the tiling width are supported.
Rotate rotate The number of degrees to rotate the copy tiling displayed over the main tiling.
Voronoi useVoronoi The switch to display a Voronoi diagram based on the generated tiling. For the URL parameter, a value of “on” indicates the Voronoi diagram will be displayed.
Mod Substitutions modSubsts Generate substitution tiles from a single tile, so that each element of tile i+1 is 1 + the corresponding element of tile i, modulo the number of colors. For the URL parameter, a value of “on” indicates that mod substitutions will be used.
Initial initial The matrix to be used for the initial tiling. As a URL parameter, this is represented by a string of digits between 0 (min color) and # colors - 1. Commas (encoded as %2C) may be used to separate the rows of the matrix, but are not required.
Substitutions substitutions The matrices to be used for the substitution tiles. As a URL parameter, this is represented by a string of digits between 0 (min color) and # colors - 1. Commas (encoded as %2C) may be used to separate the rows of each substitution tile and to separate substitution tiles from each other, but they are not required.