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 06:17:16 EDT (-0400)
  Re: csg error with megapov's solid mesh?  
From: Ron Parker
Date: 30 Aug 2000 23:29:51
Message: <slrn8qrl2r.289.ron.parker@fwi.com>
On 30 Aug 2000 19:05:10 -0400, Warp wrote:
>  Oh, and there's another problem with the ray-shooting technique:
>
>  Even if your ray hits the mesh, if the mesh consists of separate parts
>(all closed) you'll only be able to fix the part that the ray hit. The other
>parts will still have the problem.

That part is guaranteed to be the outside shell of that part of the mesh.
Take that part (all of its triangles) out of the list of triangles, then
fire another ray.  The first surface it hits is either inside the fixed set
of surfaces or not.  If it's inside, its normal should face away from the ray.
If it's outside, the normal should face toward the ray.  Continue removing
these subsurfaces from the list of triangles until none are left.  Now
they're all corrected.

I've done this algorithm in 2D.  It does work.

-- 
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.