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:15:32 EDT (-0400)
  Re: csg error with megapov's solid mesh?  
From: Ron Parker
Date: 29 Aug 2000 11:21:32
Message: <slrn8qnm0b.1dg.ron.parker@fwi.com>
On Tue, 29 Aug 2000 16:43:43 +0200, Nicolas Calimet wrote:
>> The normals are not constrained to be consistent within the mesh.
>> However, with a little work, they could be made consistent, at which point
>> such a scheme would work.  It's just a matter of writing the code...
>
>	Okay I thought it's the reason why this obvious test was not actually
>used in MegaPOV. But how to make the triangle normals consistent ? I was
>thinking about some simple (but slow) method like this:

The easiest way is to pick a face to be the reference, then realign all 
adjacent faces so they have the same "sense."  Continue until you've visited
all adjacent faces.  If an unvisited face still exists, repeat with that face
as the reference.  When finished, reorient as necessary to correct for the
possibility that an entire surface is inverted.

This only works on meshes that are well-behaved, though.  If an edge is 
shared by more or fewer than exactly two faces, the mesh is not well-behaved
and the procedure will fail.  (But in those cases, "inside" isn't well-defined
anyway.)

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