# =========================================================================== # # From: # # www.contextfreeart.org/gallery2/#design/4097 # # HEIGHT: 800 # WIDTH: 600 # # =========================================================================== # CF::MaxNatural = 2^16-1 CF::Impure = 1 CF::Background = [h 251.57 sat 0.4622 b -0.2]

generations = 300

ca_rule = randint(256)

width = 100 height = 16

start = randint(),randint(),randint(),randint(),randint(),randint(),randint(),randint(),randint(),randint(),randint(),randint(),randint(),randint(),randint(),randint()

startshape CA ( generations, start ) []

K ( _p, _q, _r ) =

bitand ( _p, 1 ) + bitleft(bitand ( _q, 1 ),1) + bitleft(bitand ( _r, 1 ),2)

F ( _p, _q, _r ) =

bitand ( 1, bitright ( ca_rule, K ( _p, _q, _r ) ) )

shape CA ( natural n, vector16 v ) {

if ( n > 0 )
{
  loop i=height [ y 2 ]
  {
    SQUARE [ alpha (-1+(0.2*bitand(v[i],1))+(v[i]*0.2)) x (-1*mod( n-1, width )) b 1 h 62 sat 0.5 s 0.8 1.9]
  }

  n_v = F(v[15],v[0],v[1]), F(v[0],v[1],v[2]), F(v[1],v[2],v[3]), F(v[2],v[3],v[4]), F(v[3],v[4],v[5]), F(v[4],v[5],v[6]), F(v[5],v[6],v[7]), F(v[6],v[7],v[8]), F(v[7],v[8],v[9]), F(v[8],v[9],v[10]), F(v[9],v[10],v[11]), F(v[10],v[11],v[12]), F(v[11],v[12],v[13]), F(v[12],v[13],v[14]), F(v[13],v[14],v[15]), F(v[14],v[15],v[0]) 

  CA ( n--1, n_v ) []
}

}

# runcfdg 1dca