Hexagonal tiling

From LifeWiki
Jump to navigation Jump to search

The hexagonal tiling, hexagonal grid, hexagonal tessellation or hexagonal lattice (Schläfli symbol {6,3}) is one of the three possible regular tilings of the plane, alongside the square tiling and triangular tiling. It is constructed with three hexagons being placed at each vertex.

While not nearly as heavily investigated as the square tiling, many general-purpose cellular automaton simulation programs support hexagonal tilings to an extent. However, since most of these have a primary focus on square tilings, such support is seldom without flaw.

Coordinates, directions and displacements

While Cartesian coordinates can be used to describe the positions of hexagons, this does not preserve symmetry well, as it effectively treats the hexagonal tiling as a square tiling and fails to consider its unique symmetries. While there exist many coordinate systems which can be used to describe the coordinates of hexagons in a symmetrical way, such as cube coordinates, none seem to be in use in cellular automaton simulation programs.

Orthogonal and diagonal directions

While the existence of distinct orthogonal and diagonal directions on a hexagonal grid is not immediately as obvious as on a square grid, they are distinct and have been defined.[1] The six cells which are directly adjacent to a central cell in the "hexagonal neighbourhood" (see the dedicated neighbourhoods section below) are considered to be orthogonally adjacent to said center cell. The six directions directly between these, which travel directly through hexagon edges, can be said to be the diagonal directions. These satisfy much of the equivalencies expected of diagonal directions.

Neighbourhoods on the hexagonal tiling

Range-1 cases

The most obvious neighbourhood to define on a hexagonal tiling would be the neighbourhood composed of the six cells orthogonally adjacent to a center cell. This neighbourhood, referred to as the hexagonal neighbourhood, is by far the most commonly investigated.

Another simple neighbourhood, called the tripod neighbourhood, can be defined by only considering every second cell adjacent to the central cell.[2] This neighbourhood has an essence of intrinsic chirality; having only half of the rotational symmetry of the usual hexagonal neighbourhood, as well as the fact that cells which are in one cell's tripod neighbourhood not including the original cell in their tripod neighbourhood (as the neighbourhood is only translated, and is never rotated or reflected),[3] imparts rather strange mechanics upon rules which use it.

Hexagonal neighbourhood (range 1).png Tripod neighbourhood (range 1).png
hexagonal tripod

Higher ranges

It is entirely possible to extend the aforementioned hexagonal and tripod neighbourhoods to higher ranges, such that cells which are not immediately orthogonally or diagonally adjacent to the central cell are also included in the neighbourhood.

The tripod neighbourhood is usually extended simply by continuing in the direction in which each cell in the range-1 tripod neighbourhood points in by one more cell, yielding what is referred to as the tripod neighbourhood of range 2.

There are two immediately obvious ways in which the hexagonal neighbourhood can be extended to a range of 2:

  • by counting all of the cells in the hexagonal neighbourhood of the cells which are in turn already in the hexagonal neighbourhood of a designated central cell, or
  • by counting all of the cells which are at an orthogonal distance 1 or 2 from a central cell.

The former is usually referred to as the hexagonal neighbourhood of range 2. The latter is referred to as the asterisk neighbourhood of range 2,[4] giving a figure which resembles the typographic symbol.

These three methods can be used to generate neighbourhoods of any desired positive integer range, not just 1 or 2. Examples up to a range of 3 can be seen below.

Range \ Type hexagonal neighbourhood asterisk neighbourhood tripod neighbourhood
1 Hexagonal neighbourhood (range 1).png Asterisk neighbourhood (range 1).png Tripod neighbourhood (range 1).png
2 Hexagonal neighbourhood (range 2).png Asterisk neighbourhood (range 2).png Tripod neighbourhood (range 2).png
3 Hexagonal neighbourhood (range 3).png Asterisk neighbourhood (range 3).png Tripod neighbourhood (range 3).png

Symmetries

All of the static and kinetic symmetries which are present on the hexagonal tiling also apply to the triangular tiling.

The ratio of a pattern's mod to its period, for rules on these grids, can only be 1, 2, 3 or 6.

Static

Isotropic rules on the hexagonal tiling will always confirm to one of 14 different static symmetries. Its sixfold rotational and reflectional symmetry permits asymmetry, twofold cyclic symmetry, threefold cyclic symmetry, sixfold cyclic symmetry, twofold mirror symmetry, fourfold mirror symmetry, sixfold mirror symmetry and twelvefold mirror symmetry, with further variants depending on the positioning of the center of rotation or the positioning and/or rotation of the planes of reflection.

Asymmetry Rotational symmetries
Onefold Twofold Threefold Sixfold
Cell-centered Edge-centered Cell-centered Vertex-centered
C1 C2_1 C2_4 C3_1 C3_3 C6
Reflectional symmetries Rotational and reflectional symmetries
Twofold Fourfold Sixfold Twelvefold
Diagonal Orthogonal Cell-centered Edge-centered Cell-centered Vertex-centered
Diagonal Orthogonal
D2_x D2_xo D4_x1 D4_x4 D6_1 D6_1o D6_3 D12

Kinetic

In addition to these 14 static symmetries, periodic patterns can also conform to one of 35 possible distinct kinetic symmetries. 14 of these duplicate the static symmetries above, with the other 21 arising for periodic patterns which have a mod unequal to their period.

"Composite symmetry" refers to the resulting symmetry of the pattern created from each of the oscillator's phases.

Static symmetry Composite symmetry period/mod Description
C1 C2_1 2 Pattern is asymmetric
Appears rotated 180 degrees during (period/2)
Rotation is centered on the center of a cell
C1 C2_4 2 Pattern is asymmetric
Appears rotated 180 degrees during (period/2)
Rotation is centered on the edge of a cell
C1 C3_1 3 Pattern is asymmetric
Appears rotated 120 degrees during (period/3)
Rotation is centered on the center of a cell
C1 C3_3 3 Pattern is asymmetric
Appears rotated 120 degrees during (period/3)
Rotation is centered on the vertex of a cell
C1 C6 6 Pattern is asymmetric
Appears rotated 60 degrees during (period/6)
Rotation is centered on the center of a cell
C2_1 C6 3 Pattern has C2_1 symmetry
Appears rotated 60 degrees during (period/3)
Rotation is centered on the center of a cell
C3_1 C6 2 Pattern has C3_1 symmetry
Appears rotated 60 degrees during (period/2)
Rotation is centered on the center of a cell
C1 D2_x 2 Pattern is asymmetric
Appears flipped across a diagonal line during (period/2)
Line passes through the vertices of a cell
C1 D2_xo 2 Pattern is asymmetric
Appears flipped across an orthogonal line during (period/2)
Line passes through the edges of a cell
C2_1 D4_x1 2 Pattern has C2_1 symmetry
Appears flipped across both a diagonal and orthogonal line during (period/2)
Lines intersect in the center of a cell
C2_4 D4_x4 2 Pattern has C2_4 symmetry
Appears flipped across both a diagonal and orthogonal line during (period/2)
Lines intersect in the center of an edge.
D2_x D4_x1 2 Pattern has D2_x symmetry
Appears flipped across an orthogonal line during (period/2)
Lines intersect in the center of a cell
D2_x D4_x4 2 Pattern has D2_x symmetry
Appears flipped across an orthogonal line during (period/2)
Lines intersect in the center of an edge
D2_xo D4_x1 2 Pattern has D2_xo symmetry
Appears flipped across a diagonal line during (period/2)
Lines intersect in the center of a cell
D2_xo D4_x4 2 Pattern has D2_xo symmetry
Appears flipped across a diagonal line during (period/2)
Lines intersect in the center of an edge
C3_1 D6_1 2 Pattern has C3_1 symmetry
Appears flipped across one of three diagonal lines during (period/2)
Lines intersect in the center of a cell
C3_1 D6_1o 2 Pattern has C3_1 symmetry
Appears flipped across one of three orthogonal lines during (period/2)
Lines intersect in the center of a cell
C3_3 D6_3 2 Pattern has C3_3 symmetry
Appears flipped across one of three diagonal lines during (period/2)
Lines intersect in a vertex
C6 D12 2 Pattern has C6 symmetry
Appears flipped across one of three diagonal lines and one of three orthogonal lines during (period/2)
Lines intersect in the center of a cell
D6_1 D12 2 Pattern has D6_1 symmetry
Appears rotated 60 degrees during (period/2)
Could also be interpreted as flipping on one of three orthogonal lines
Rotation is centered on/lines intersect at the center of a cell
D6_1o D12 2 Pattern has D6_1o symmetry
Appears rotated 60 degrees during (period/2)
Could also be interpreted as flipping on one of three diagonal lines
Rotation is centered on/lines intersect at the center of a cell

Emulation on a square grid

As almost all known cellular automata simulation programs use a square grid and Cartesian coordinates, the hexagonal neighbourhood does not arise naturally like the von Neumann and Moore neighbourhoods do. As such, simulating hexagonal rules demands that the hexagonal grid be "emulated" on the square grid.

The following demonstration shows how the range-1 hexagonal neighbourhood can be represented on the square tiling. It resembles a Moore neighbourhood with two opposite diagonal corners removed, resulting in something which resembles a ship. This functionally works identically to a hexagonal neighbourhood, although at the cost of visual distortion and a loss of symmetry.

Emulated hexagonal neighbourhood (range 1).png Representation of the hexagonal neighbourhood on the square tessellation.png Hexagonal neighbourhood (range 1).png
Emulated hexagonal neighbourhood How the hexagonal neighbourhood is usually emulated on a square tiling True hexagonal neighbourhood

Software support

While most of the commonly used general-purpose cellular automaton simulation programs extend support to hexagonal grids, such support is not perfect. As mentioned previously, since most programs are made to operate on square grids, hexagonal rules are emulated on a square grid, often with certain visual transformations after the fact as to make the hexagonal grid within more apparent. Editing capabilities are also generally of less use, since few programs currently support threefold rotations.

Making the grid appear hexagonal

Golly has two methods to allow for viewing hexagonal-grid patterns more clearly:

  • A specific icon is defined for use with hexagonal rules. When icons are active, each cell is rendered as a slanted hexagon;[5] these hexagons combine to form a distorted hexagonal grid, which makes the roles of each cell slightly clearer, although not perfectly.
  • Desktop distributions of Golly come with hexgrid.lua, a script which can be used to view patterns on a hexagonal grid clearly. However, due to the lack of script support in Golly's mobile versions, this script is not available.

LifeViewer renders the entire grid as a hexagonal grid when a hexagonal rule is in use. This is the default setting for hexagonal rules; it is also possible to switch to an "offset square" grid in which each cell is rendered as a square in a "brick wall" formation. The offset square grid is also used at zoom levels below 4.0, and is less computationally expensive to draw than hexagons. It is not possible to view hexagonal patterns on a square grid; this functionality was removed in 2019,[6] and as such viewing hexagonal patterns on a non-offset square grid requires a dedicated custom rule table or transition map string which emulates the desired hexagonal rule. There are also certain visual effects which are not available for hexagonal grids nor triangular grids:

  • Camera rotation (support is planned for a future build)[7]
  • Layers and depth[8]
  • Tilt[9]

LifeViewer's hexagons are also slightly irregular, being taller than they are wide; making these hexagons as regular as possible may be done in a future update.[10] In addition, major grid lines are not supported for true hexagonal grids, but are for offset square grids (although likely being of little use in this state, since vertical lines are largely distorted).

Hexagonal pattern editing

Pattern editing, being square-grid-based, does not translate perfectly to hexagons, as they only share 180-degree rotation. Horizontal and vertical flipping, while it would be expected to be possible on both grids due to them sharing symmetries, is also complicated by the usual emulation method, as only diagonal flipping is preserved with it (operations which are generally unsupported on their own by most programs and as such must be performed by composing other operations). While not explicitly forbidden, operations such as 90-degree rotations effectively scramble patterns into something different rather than rotate them in a useful way.

Square selections made on a square grid are functionally rhombic on a hexagonal grid. LifeViewer makes this very clear visually, as it does not support selection shapes more suited to a hexagonal grid (although is planned to)[7][11][12] and as such a rhombus shape can be clearly seen when making selections.[13]

As of January 2022, neither Golly nor LifeViewer fully support the following editing features:

  • Selections
    • Still operate on a square grid, making them functionally (and in LifeViewer's case, visually) rhombic
    • Cannot be performed at all in hexgrid.lua, forbidding other edits
    • Support for selection shapes which make more sense for hexagonal grids is planned for LifeViewer[7][11][12]
  • Selection flipping
    • Assumes a square grid rather than acknowledging the emulated hexagonal grid
    • Also assumes there are only two orthogonal planes to flip across, rather than three
    • Support for better selection flipping is planned for LifeViewer[11]
  • Selection rotation
    • Assumes a square grid rather than acknowledging the emulated hexagonal grid
    • 90-degree rotations (CW, CCW) are allowed, despite these rotations being impossible on hexagonal grids
    • There are no options for 60-degree and 120-degree rotations (CW, CCW)
    • Support for better selection rotation is planned for LifeViewer[11]

Coordinates, displacement notation and static and kinetic symmetries

Information below this point to be refactored

  • Directions of spaceships on hexagonal and triangular grids from Identify[14]
  • Calculating the mod of oscillators and spaceships on hexagoal and triangular grids in Identify[12]

However, the following functionalities currently either do not work for hexagonal grids, or treat the rule as a square-grid rule, resulting in anomalous behaviour:

  • Bounded grids are still based on a square grid, resulting in a "bounded rhombus" (and forbidding potential hexagonal manifolds such as Dyck's surface)
  • Coordinates are still Cartesian, rather than using a hexagonal-based system such as cube coordinates
  • Custom outer-totalistic neighbourhoods are still based on subsets of the Moore neighbourhood

In addition, the following LifeViewer functions are not (currently) available for hexagonal grids:

  • Identify mod and direction calculations
    • Bounding box values as well as spaceship displacement (header only) are still produced, however do not make much sense due to still being square-based

See also

References

External links