Hexagonal tiling: Difference between revisions

From LifeWiki
Jump to navigation Jump to search
Removed redirect to Hexagonal neighbourhood
Tag: Removed redirect
No edit summary
Line 3: Line 3:


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.
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.
== 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 hexagonal neighbourhood can be simulated as 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.
{| class="wikitable" style="margin-left: auto; margin-right: auto; text-align: center;"
| [[File:Hexagonal neighbourhood (range 1).png]]
| [[File:Emulated hexagonal neighbourhood (range 1).png]]
|-
! True hexagonal neighbourhood
! Emulated hexagonal neighbourhood
|}
This is mitigated differently depending on the simulation program used:
* [[Golly]] has a dedicated icon used for hexagonal rules. When active, it renders each cell as a slanted hexagon which combine to form a distorted hexagonal grid,<ref>{{LinkGollyHelp|Algorithms/QuickLife.html|title=QuickLife|format=ref}}</ref> which makes the roles of each cell slightly clearer, although not perfectly. The hexgrid.lua script can be used to view patterns on a hexagonal grid clearly, however this is only available for desktop computers.
* [[LifeViewer]] renders the entire grid as a hexagonal grid, making how patterns actually look much clearer.
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)
* Selections are still based on a square grid, resulting in functionally rhombic selections
* Selection rotations are still based on a square grid, forbidding 60-, 120-, 240- and 300-degree rotations (while allowing 90- and 270-degree rotations, which scramble patterns into something functionally different)
* Selection reflections are still based on a square grid, which pose a similar problem to the above
* 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:
* Visual rotation, tilt, layers and layer depth
* 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
* Major grid lines
** Become visible when "Use Rectangles" is enabled, however in this case said lines are square-based and distorted
{| style="width: 100%; left-margin: auto; right-margin: auto; border-collapse: collapse;" cellpadding="0"
|- style="vertical-align: top;"
| [[File:Representation of the hexagonal neighbourhood on the square tessellation.png|frame|center|Representation of the hexagonal neighbourhood on the square tessellation.]]
|}


== Neighbourhoods on the hexagonal tiling ==
== Neighbourhoods on the hexagonal tiling ==

Revision as of 14:53, 11 January 2022

The hexagonal tiling, hexagonal grid, hexagonal tessellation or hexagonal lattice (Schläfli symbol: {6,3}) is one of the three possible proper Euclidean tilings of 2D space, 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.

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 hexagonal neighbourhood can be simulated as 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.

True hexagonal neighbourhood Emulated hexagonal neighbourhood

This is mitigated differently depending on the simulation program used:

  • Golly has a dedicated icon used for hexagonal rules. When active, it renders each cell as a slanted hexagon which combine to form a distorted hexagonal grid,[1] which makes the roles of each cell slightly clearer, although not perfectly. The hexgrid.lua script can be used to view patterns on a hexagonal grid clearly, however this is only available for desktop computers.
  • LifeViewer renders the entire grid as a hexagonal grid, making how patterns actually look much clearer.

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)
  • Selections are still based on a square grid, resulting in functionally rhombic selections
  • Selection rotations are still based on a square grid, forbidding 60-, 120-, 240- and 300-degree rotations (while allowing 90- and 270-degree rotations, which scramble patterns into something functionally different)
  • Selection reflections are still based on a square grid, which pose a similar problem to the above
  • 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:

  • Visual rotation, tilt, layers and layer depth
  • 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
  • Major grid lines
    • Become visible when "Use Rectangles" is enabled, however in this case said lines are square-based and distorted
Representation of the hexagonal neighbourhood on the square tessellation.

Neighbourhoods on the hexagonal tiling

  1. ↑ QuickLife at Golly's online help