|
|
On 5 Jun 2000 06:01:51 -0400, Warp wrote:
> About a recent post in p.general:
>
> When is a triangle degenerate?
> I think that one case is when two of the vertices or all the three are
>actually the same point. In this case it would be just an infinitely thin
>line or point.
Or when they fall in a line, such as x, 2*x, 3*x. The actual condition is
"when the cross product of P1-P2 and P3-P2 is zero." Note that this is not
the usual "within epsilon of zero" condition; it must actually be zero.
> I faintly remember that povray also considers denerate a smooth triangle
>with the vertex normals pointing to different sides of the triangle. Is
>this so?
The comment in triangle.c says
/* Degenerate if smooth normals are more than 90 from actual normal
or its inverse. */
where the actual normal is the aforementioned cross product after
normalization. The actual test, however, makes more sense: it requires
that the signs of the dot products of the corner normals with the actual
normal must either be all positive or all negative. In short, what you
said, with the additional requirement that corner normals in the plane
of the triangle are also degenerate.
This calculation, too, ignores epsilon.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
|