[comp.graphics] Complex Fill Algorithm

allan@didsgn.uucp (didsgn) (08/29/89)

The problem with many floodfill algorithms is that as the complexity
of the object increases, so does the storage required to handle
decision points. Thus if you have a limited amount of storage, you
cannot guarantee that ANY object can be filled.

I have a complex fill algorithm whose space requirements are static
(i.e. they do not change with the complexity of the object) and works
on ANY complex object. The border is assumed to be 8-connected and the
area to be filled is 4-connected. 8-connected means that a center pixel
is connected to all of the 8 neighbor pixels while 4-connected means that
the center pixel is only connected to the north, south, east and west
pixels. None of the diagonal pixels are connected to a 4-connected pixel.
When filling, you cannot cross the border.

Floodfill algorithms are pretty fast but have a space limitation problem.
My algorithm is fairly fast but slows down a bit as the complexity of the
object increases. Thus the tradeoff is space vs. time although my algorithm
works on any object.

If anyone is interested, please contact me by mail.

-Allan G. Schrum
(404) 447-0274

...!gatech!rebel!didsgn!allan