I've removed some of the initial (and bad) assumptions about which contour
the internal island contours should be added to.  The island contours now
correctly determine their parent contour and are added accordingly.  This
will allow higher-degree stacked contours like book/tesswind to work
correctly.

And I've come to the final conclusion that the polygon clipping algorithm
I've been using (Michael V. Leonov, Alexey G. Nikitin, "An efficient
algorithm for a closed set of Boolean operations on polygonal regions in the
plane", Preprint 46, Novosibirsk, A. P. Ershov Institute of Informatics
Systems, 1997 - http://members.xoom.com/msleonov/pbpaper.html) is
fundamentally flawed and will not handle self-intersecting contours.  I
added a slightly modified preprocessing pass of the algorithm that improved
things a lot, but it still fails to distinguish between edges going into and
edges coming out of the interior of the contour.  I had the spiral in
book/tesswind almost working, but that broke book/tess.  I could probably
get to complete correctly with a _lot_ of special case handling, but why
bother?  I'm thinking the best thing to do is throw the whole thing out and
implement a left-to-right sweep, active-edge table kind of approach (as in
GPC - http://www.cs.man.ac.uk/aig/staff/alan/software/index.html).

Arne and Jens, I worked out why the last one of the first sample contours
wasn't completing, and it's because it was a self-intersecting, twisted
contour that basically would have worked if the demos worked correctly.
Once the self-intersecting contour stuff is worked out, we should be in a
much better position.

Any comments?  With the amount of code I've been writing lately it should
only take me a couple of days to get something working :)

-- Gareth

==============================================
Gareth Hughes        mailto:[EMAIL PROTECTED]
DEFINITY� Site Administration Project
Lucent Technologies, Bell Labs Australia ph: +61 2 9352 8608


_______________________________________________
Mesa-dev maillist  -  [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev

Reply via email to