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:
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:
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:
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:
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:
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.