Re: Proceeding apace...

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Fri, 24 Mar 2000 00:00:29 -0500, simulat
<simulat at INTERGATE.BC.CA> wrote:

>This is pretty vague, but I remember some sort of odd/even rule that was
>used for fills:
>Start at the screen edge at the top
>If you are inside the your fill area at the start then
>    start with the fill color turned on,
>    otherwise off.
>When you hit a boundary between the fill zone and the non fill zone, toggle
>the fill color.

> Basically, an even number of boundary jumps means that the pixel colour is
>the same as the screen edge, and an odd number of jumps means that the pixel
>colour is the opposite of the screen edge. So basically, you just do a
>raster scan of all the pixels, toggling the fill colour whenever the
>boundary colour is encountered.

Yes, I forgot what this algorithm is called, but it's one
possibility that I have - the major flaw with this one is that it
doesn't handle self-intersecting figures properly.  A secondary
flaw is one that will appear with almost any algorithm that I've
seen; what if there are two overlapping figures drawn in the same
color?  That's the bridge that I'll fall off when I come to it...

--
Jeff Zeitlin
jzeitlin at cyburban.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu