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 -o2048x8192x8_5-starts.ppm -s2048:8192:8 -p1506,3613 -p714,3488 -p350,4202 -p917,4769 -p1631,4405
Generated with C code (Public Domain) from Christopher Wellons:
github.com/skeeto/every-rgb