[comp.graphics] Computational geometry II

ksbooth@watcgl.waterloo.edu (Kelly Booth) (04/30/89)

P.S.  The algorithm presented in

article <5397@cs.utexas.edu> by atc@cs.utexas.edu (Alvin T. Campbell III)

is typical of most of these "solutions".  It walks the entire polygon looking
for the "top" vertex (incorrectly, as it turns out, but making it right takes
even more code), when Newell's formula would perform a fairly simple (but
floating-point, to be sure) calculation at each vertex and be done with it.

For quadrilaterals and triangles (by far the most common cases), I believe
the total computation is less for the Newell's formula.  As the number of
vertices gets large, Newell's formula may lose, but in these cases the
chance of "bad" data increases, so Newell's formula is even more appropriate.
(And if you only want the orientation, you don't have to compute all three
coefficients, just c).

rhbartels@watcgl.waterloo.edu (Richard Bartels) (04/30/89)

In article <9458@watcgl.waterloo.edu> ksbooth@watcgl.waterloo.edu (Kelly Booth) writes:
>
>(And if you only want the orientation, you don't have to compute all three
>coefficients, just c).
>

The context of the midterm question, which Kelly forgot to mention, is
one in which the lines of sight are all parallel to the z axis.  This is
why c alone gives the (back/front facing) orientation.

-Richard