Maintainer | ch.howard@zoho.com |
---|---|

Safe Haskell | None |

This module implements the core algorithm for 1-D binary cellular automata with next-nearest-neighbor updating.

# Documentation

:: Vector Bool | the initial row of binary values |

-> Word32 | the 32-bit rule |

-> Int | the number of rows returned |

-> Vector Bool | the rows returned concatenated into a single vector |

Starting with a single row of binary values, this function generates a vector of rows in which each row (except the first) is based on the values of the previous row, using the next-nearest neighbors calculation based upon the 32 bit rule provided.

:: Vector Bool | a grid (set of rows) concatenated in a single vector |

-> Int | the width of a row in the grid |

-> Vector (Bool, Int) |

This function overlays each point in a grid with the 32-bit value category it falls into. This is a simple method of categorizing pixels in a generated pattern, so that color and masks can be applied to them in interesting ways.