Modify Conway's game of life to follow specific rules using a Tetrahedron in 3 dimensions

Using [login to view URL] modify the configuration or code so that the rules activate based on the neighboring facet of a tetrahedron in 3d space. tetrahedrons are stacked point up layer and a layer the is nested point down to fit the point up tetrahedrons which makes one layer. Then infinite or large amount of layers going up and about the same length expanding in all directions. Need to model or calculate about a few thousand cells or tens of thousands of cells. A related issue is pattern editing. Square Cell, Hexagonal Cell and Triangular Cell do not use rubber banding or the clip board to perform pattern editing. Rather, a group of cells may be selected by clicking the display with the control key depressed. The first click marks a corner of the selection area and the second click marks the diagonally opposite corner. A third click clears the selection. When selected a group of cells may be manipulated by several of the toolbar buttons. Selections may be rotated, flipped, written to a file, set to a random state and moved or copied by dragging. The inside or outside of a selection may also be cleared. 90 degree rotations are performed by Square Cell and 60 degree rotations are performed by Hexagonal Cell and Triangular Cell. Here is a analogous script . #Golly Python script

#Written by PM 2Ring 2009.3.23

''' Use the current selection as a template to create a tiled pattern, converting

each live cell in the selection into a copy of the clipboard pattern. Each dead cell

in the selection becomes a rectangle the same size as the clipboard pattern. '''

from glife import *

import golly

def tile(pat, px, py):

''' Convert live cells in selected pattern into copies of the pattern pat, size px*px.

The tile pattern is in a new layer. '''

selrect = [login to view URL]()

if len(selrect) == 0: [login to view URL]("There is no selection.")

#Make top left corner of selection the origin of the tiled pattern

x, y = selrect[:2]

cells = [login to view URL](selrect)

cellsxy = [(cells[i]-x, cells[i+1]-y) for i in xrange(0, len(cells), 2)]

#Make tiled pattern in a new layer

[login to view URL]()

#[login to view URL]("syncviews", False)

#Build new window title from old

title = [login to view URL]().split('.')[0]

title = '%s_tiled' % title

[login to view URL](title)

all = pattern()

for x, y in cellsxy:

all += pat(x*px, y*py)

#[login to view URL](x*px, y*py)

[login to view URL]()

def main():

cliplist = [login to view URL]() # 1st 2 items are width, height

tile(pattern(cliplist[2:]), *cliplist[0 : 2])

main()

Habilidades: Modelagem 3D, Programação C++ , Python, Lua