POV-Ray : Newsgroups : povray.advanced-users : Polygon planarity : Polygon planarity Server Time
29 Jul 2024 18:29:18 EDT (-0400)
  Polygon planarity  
From: Eric Dowty
Date: 30 Mar 2001 13:56:25
Message: <3AC4D788.930EAA99@shapesoftware.com>
I am adding POV-Ray file support to my commercial programs for drawing
atomic structure and external shapes of crystals
(www.shapesoftware.com).  This is just about complete and the results
are very good except for one problem.

I use polygons of various sizes for crystal faces, faces of atomic
coordination polyhedra, etc., which are all defined by corners.  POV-Ray
seems to want polygons to be planar to about the tenth decimal, whereas
at the moment I am using 4-byte FP variables which are only good to
about the fifth decimal.  Thus POV-Ray often rejects these polygons.
Even if I convert to 8-byte variables, I doubt if general precision
could be maintained to the tenth decimal point, as the user has the
option of rotating the 3D objects before writing the POV-Ray file, and
there are certain other approximations which are used in some cases.

For my purposes the best solution to this problem would be to have an
adjustable precision for the polygon planarity test, e.g.

precision = 0.0001

Maybe there is something like this already, but I could not find it in
the Help file.

I might mention that my programs use other 3D packages, including OpenGL
on Windows and Macintosh, QuickDraw 3D on Mac, and VRML files, and this
problem has never arisen with them, so it would seem that a super-high
degree of precision is not necessary.

Eric Dowty
dow### [at] shapesoftwarecom


Post a reply to this message

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