-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
34 lines (24 loc) · 663 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import automata
import render
rounds = 100
time = 50000
dt = time // rounds
width = 2522
height = 2522
shape = (dt, height, width)
print("Automata building.")
x = automata.Automata(shape)
xb = x.boundary()
xb[ x.shape[1] // 2] = 1
# shape[1] corresponds to the height
# so this creates a horizontal line halfway through the grid.
for j in range(rounds):
offset = shape[0] * j - j # Because the rounds share a boundary.
x.run()
for index in range(shape[0]):
render.layer2bmp(x, index, offset=offset)
y = automata.Automata(shape)
y._data[0] = x._data[-1]
x=y
#Uh.... Yeah.
render.bmp2mp4(shape, j)