POV-Ray : Newsgroups : povray.advanced-users : Polygon planarity tolerance : Re: Polygon planarity tolerance Server Time
29 Jul 2024 04:24:01 EDT (-0400)
  Re: Polygon planarity tolerance  
From: Tek
Date: 22 Dec 2002 13:06:59
Message: <3e05ff43$1@news.povray.org>
If you know your polygons aren't quite flat can't you just draw them as several
triangles?

I suspect increasing tolerance is a bad idea cause you'll start getting
artefacts under some circumstances. i.e. it worked fine for your purposes but it
might cause problems elsewhere.

Besides, surely triangles render faster because pov has good mesh optimisations?
--
Tek
http://www.evilsuperbrain.com


Eric Dowty <dow### [at] shapesoftwarecom> wrote in message
news: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.