[comp.sources.wanted] Wanted: polygon fill routines

smiller@wet.UUCP (Gregory Shane Miller) (10/31/90)

Wanted: polygon (simple best, convex OK) "filler"

Should be able to take (for example):

		/-------------------------------\
		|                                \
		|				 /
		\-------------------------------/

And generate:

		/-------------------------------\
		|++++++++++++++++++++++++++++++++\
		|++++++++++++++++++++++++++++++++/
		\-------------------------------/

Where the ++++ would be horizontal lines of form s1,t1 -> s2,t1
and the polygon would be given as x0,y0,x1,y2 ... xn,yn,x0,y0.
In my case, *all* of the endpoints will be integers and the
end points for the horizontal lines can/should be integers too
(ie. no need to worry about resolution too much).

Note: "vertical scan lines" (or in general, any set of parallel lines)
would suffice in place of the +++++++++.

Again, the algorithm does need to fill any polygon.  In the best
case it should do simple polygons or (somewhat worse) convex polygons.

This, to my way of thinking, is *not* exactly equivalent to a
graphic (viz graphics versus text video mode) flood fill.

Any references and/code are greatly appreciated.  Thanks.

Regards-
smiller@wet.UUCP

-- 
--
G. Shane Miller [ smiller@wet.UUCP ]  Von Neumann eat your heart out!