diff --git a/.ldoctest b/.ldoctest
new file mode 100644
index 0000000..35a8350
--- /dev/null
+++ b/.ldoctest
@@ -0,0 +1,12 @@
+-- Environment for `forma` ldoctests
+return {
+ math = math,
+ assert = assert,
+ print = function() end,
+ cell = require('forma.cell'),
+ pattern = require('forma.pattern'),
+ automata = require('forma.automata'),
+ primitives = require('forma.primitives'),
+ subpattern = require('forma.subpattern'),
+ neighbourhood = require('forma.neighbourhood'),
+ }
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4911150..b83406b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -60,3 +60,16 @@
- Slightly faster convergence check for `automata.iterate`
- Harmonised coordinate handling between pattern prototype and tostring
+
+0.4
+---------
+
+# Features
+- Perlin noise sampling
+- Quadratic Bezier curve drawing.
+
+# Misc
+ - Check that CA rule sets don't have neighbourhoods that are too large for
+ the rule signature format (>10 neighbours)
+ - Fixed some typos in usage examples
+ - Setup forma documentation example checking with `ldoctest`
diff --git a/README.md b/README.md
index 3140276..66e1aa5 100644
--- a/README.md
+++ b/README.md
@@ -21,12 +21,13 @@ suited (but not limited) to the generation of roguelike environments.
- **A spatial-hashing pattern** class for fast lookup of active cells.
- **Pattern manipulators** such as the addition, subtraction, rotation and reflection of patterns.
-- **Rasterisation algorithms** for 2D primitives, e.g lines, circles, squares.
+- **Rasterisation algorithms** for 2D primitives, e.g lines, circles, squares and Bezier curves.
- A very flexible **cellular automata** implementation with
- Synchronous and asynchronous updates
- Combination of multiple rule sets
- **Pattern sampling** algorithms including
- Random (white noise) sampling
+ - Perlin noise sampling
- Poisson-disc sampling
- Mitchell's best-candidate sampling
- **Algorithms for subpattern finding** including
@@ -69,7 +70,7 @@ end
-- Find all 4-contiguous segments of the CA pattern
-- Uses the von-neumann neighbourhood to determine 'connectedness'
--- but any custom neighbourhood can be used)
+-- but any custom neighbourhood can be used.
local segments = subpattern.segments(ca, neighbourhood.von_neumann())
-- Print a representation to io.output
@@ -82,12 +83,19 @@ subpattern.print_patterns(domain, segments)
is written in pure Lua, no compilation is required. Including the project is as
simple as including the `forma` directory in your project or Lua path.
-The easiest way to do this is via LuaRocks:
+The easiest way to do this is via LuaRocks. To install the latest stable version
+use:
```Shell
luarocks install forma
```
+Alternatively you can try the dev branch with:
+
+```Shell
+ luarocks install --server=http://luarocks.org/dev golflike
+```
+
## Documentation
Documentation is hosted [here](https://nhartland.github.io/forma/).
diff --git a/docs/contents.html b/docs/contents.html
index 77612f5..e56de72 100644
--- a/docs/contents.html
+++ b/docs/contents.html
@@ -51,6 +51,7 @@