In the last post, Area fill algorithm: crayons and coloring book , I showed a program that emulates a kid drawing in a coloring book. However, the algorithm wasn’t very efficient, and would explode even if you had a simple drawing: it was using the stack