The algorithm works like this:
- Pick a color and set a pixel to this color.
- Repeat step 1 as many times as desired.
- Pick a color.
- Find the colored edge pixel closest in color to this color.
- Set one of its uncolored 8-adjacent pixels to this color.
- Go to step 3 unless all pixels have been colored.
Command line used:
./color -o4096x4096x8_4-starts.ppm -s4096:4096:8 -p0,0 -p4095,0 -p0,4095 -p4095,4095
Generated with C code (Public Domain) from Christopher Wellons:
github.com/skeeto/every-rgb