POV-Ray : Newsgroups : povray.advanced-users : Polygon planarity tolerance : Polygon planarity tolerance Server Time
29 Jul 2024 04:25:20 EDT (-0400)
  Polygon planarity tolerance  
From: Eric Dowty
Date: 22 Dec 2002 12:55:46
Message: <3e05fca2$1@news.povray.org>
POV-Ray requires points in a polygon to be within
ZERO_TOLERANCE of
planarity, otherwise they are not drawn:

file polygon.cpp:

#define ZERO_TOLERANCE 1.0e-10
--------------------------------------
function Compute_Polygon:
   if (fabs(d) > ZERO_TOLERANCE)
    {
      Set_Flag(Polyg, DEGENERATE_FLAG);
     Warning(0, "Points in polygon are not co-planar.
Ignoring polygons.");
    }
--------------------------------------

In practice, this usually means that polygons with more than
three
corners have to be defined in a principal plane (one
coordinate =
zero).  Since I use general polygons in my software
(www.shapesoftware.com), POV-Ray often fails to draw them.

Actually, it does not appear that this degree of precision
is
necessary.  I changed the tolerance value to 0.0002 in the
above
instance, and have had no problems - all the polygons draw
OK.

I suggest that either a) the tolerance (in this one place)
be changed
to a more reasonable value, like 0.0002, or b) the user have
the
option of overriding the value.


Eric Dowty
dow### [at] shapesoftwarecom


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.