Spill: World

You can reset the world each cycle with the world function.

$: world()

Use all the usual strudel functions to make it slower or faster or whatever.

$: world().slow(4)
$: world().struct("x - - x - - x -")

By default, the world gets reset to a 100 by 100 cells grid. You can change that.

$: world().size(60, 40)
$: world().width(10)

You can alternatively specify height and width with a diagram.

$: world().to(`
xxxxx
xxxxx
xxxxx
xxxxx
`)

By default, the world gets filled with black cells. You can fill it with anything though.

$: cell("R").color("red")
$: world().fill("R")

You can also fill it with a pattern of cells. This creates zebra stripes.

$: cell("W").color("white")
$: cell("B").color("black")
$: world().fill("WB")

Bear in mind, the bigger your world, the longer you’ll have to wait for it to grow. All other rules get frozen while a world is growing.

This world will take ages to grow. It probably doesn’t have enough time to finish growing before it gets reset again on the next cycle.

$: world().size(99999, 99999)

When making fractals, it’s common practice to initialise the world to just one cell, which then splits into smaller version of itself.

$: cell("R").color("red")
$: cell("B").color("blue")
$: world().to("R")

$: rule().from("R").to(`
  RR
  BR
`)

Back to the spill