Bounded grids with various topologies can be created by adding a special suffix to the usual rule string. For example, B3/S23:T30,20 creates a toroidal Life universe 30 cells wide and 20 cells high. The suffix syntax is best illustrated by these examples:
:P30,20 | — plane with width 30 and height 20 | |
:P30,0 | — plane with width 30 and infinite height | |
:T0,20 | — tube with infinite width and height 20 | |
:T30,20 | — torus with width 30 and height 20 | |
:T30+5,20 | — torus with a shift of +5 on the horizontal edges | |
:T30,20-2 | — torus with a shift of -2 on the vertical edges | |
:K30*,20 | — Klein bottle with the horizontal edges twisted | |
:K30,20* | — Klein bottle with the vertical edges twisted | |
:K30*+1,20 | — Klein bottle with a shift on the horizontal edges | |
:C30,20 | — cross-surface (horizontal and vertical edges are twisted) | |
:S30 | — sphere with width 30 and height 30 (must be equal) |
Some notes:
The different topologies are described in the following sections.
Plane
A bounded plane is a simple, flat surface with no curvature. When generating patterns in a plane, Golly ensures that all the cells neighboring the edges are set to state 0 before applying the transition rules, as in this example of a 4 by 3 plane:
| rule suffix is :P4,3 |
Torus
If the opposite edges of a bounded plane are joined then the result is a donut-shaped surface called a torus. Before applying the transition rules at each generation, Golly copies the states of edge cells into appropriate neighboring cells outside the grid. The following diagram of a 4 by 3 torus shows how the edges are joined:
| rule suffix is :T4,3 |
A torus can have a shift on the horizontal edges or the vertical edges, but not both. These two examples show how shifted edges are joined:
|
|
Klein bottle
If one pair of opposite edges are twisted 180 degrees (ie. reversed) before being joined then the result is a Klein bottle. Here are examples of a horizontal twist and a vertical twist:
|
|
A Klein bottle can only have a shift on the twisted edges and only if that dimension has an even number of cells. Also, all shift amounts are equivalent to a shift of 1. Here are two examples:
|
|
Cross-surface
If both pairs of opposite edges are twisted and joined then the result is a cross-surface (also known as a real projective plane, but Conway prefers the term cross-surface). Here's an example showing how the edges are joined:
| :C4,3 |
Note that the corner cells have themselves as one of their neighbors. Shifting is not possible.
Sphere
If adjacent edges are joined rather than opposite edges then the result is a sphere. By convention we join the top edge to the left edge and the right edge to the bottom edge, as shown in this 3 by 3 example:
| :S3 |
Note that the cells in the top left and bottom right corners (the "poles") have different neighborhoods to the cells in the top right and bottom left corners. Shifting is not possible.
Example patterns using the above topologies can be found in Patterns/Life/Bounded-Grids.