-
Notifications
You must be signed in to change notification settings - Fork 0
dantreiman edited this page Jul 2, 2015
·
15 revisions
Chances are you've seen Conway's Game of Life. SmoothLife is an attempt to generalize Conway's game of life to a continuous domain.
Lets start with Conway's game of life. We'll begin by defining the 'inner neighborhood' M, and the 'outer neighborhood' N. Next, let's define
m = M
n = ΣN.
We can write the Game of Life update rule as a function L(n,m) such that:
L(n,m) = 0 ; n < 2
L(n,m) = 0 ; n > 3
L(n,m) = 1 ; m = 1, 1 < n < 4
L(n,m) = 1 ; m = 1, n = 3
Smoothlife uses a circular neighborhood over a field of continuous values. The 'inner neighborhood' becomes a circle, and the 'outer neighborhood' becomes a ring. The neighborhoods can now be any size, so we'll also introduce normalization constants αm and αn to keep n and m in the range of [0, 1].
inner_sum = The area of the inner circle
outer_sum = The area of the outer ring
m = ΣM / inner_sum
n = ΣN / outer_sum
Our update rule will be a continuous function S(n,m) : [0,1] x [0,1] -> [0,1]. There are many possible options for this function with widely different results, and this is an open space for exploration.
The first three parameters here define the neighborhood kernels.
float inner_radius; // Defines the radius of the inner neighborhood M.
float outer_radius; // Defines the radius of the outer neighborhood N.
float border; // Border width for anti-aliasing (typically 1)
The remaining parameters control the transition function. The plot below shows the transition function for SmoothLifeL (a variant of SmoothLife which produces interested structures and gliders)

float b1, b2; // The 'birth' interval
float d1, d2; // The 'death' interval
float alphan; // Smoothing width in the direction of the n axis.
float alpham; // Smoothing width in the direction of the m axis.
float dt; // The timestep