POV-Ray : Newsgroups : povray.unofficial.patches : csg error with megapov's solid mesh? : Re: csg error with megapov's solid mesh? Server Time
2 Sep 2024 00:16:06 EDT (-0400)
  Re: csg error with megapov's solid mesh?  
From: Ron Parker
Date: 29 Aug 2000 11:23:56
Message: <slrn8qnm4s.1dg.ron.parker@fwi.com>
On Tue, 29 Aug 2000 16:43:43 +0200, Nicolas Calimet wrote:
>1) Calculate the geometric center of all the mesh vertices
>2) For each triangle
>  a. calculate its geometric center from its vertices
>     or even simply choose one of its vertex
>  b. compare its normal vector to the (triangle center)-(vertices
>     center) vector.
>  c. revert the triangle vector if dot product is negative
>

This algorithm is only guaranteed to work for convex meshes.  It 
fails for meshes with concavities or with multiple surfaces.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

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