POV-Ray : Newsgroups : povray.general : inside_vector ??? : Re: inside_vector ??? Server Time
5 Aug 2024 20:21:31 EDT (-0400)
  Re: inside_vector ???  
From: Mike Williams
Date: 7 Sep 2002 02:22:18
Message: <mLbyPDAQqZe9Ewo3@econym.demon.co.uk>
Wasn't it Charles Fusner who wrote:
>How about the following? I have really only changed the wording
>a tiny bit on the explanation of solid mesh (by changing "a point"
>to "a point on an object", and beginning with a brief summary of
>why meshes used to be a problem to emphasize better why the
>solution works.) I've also added something to suggest how to
>pick an inside vector (assuming that I'm understanding this
>correctly myself). Does this clarify better (and is it technically
>correct?)
>
>-------------------------------------------
>
>In order to compute a CSG, POV-Ray must be able to determine if a
>portion of a given object lies inside or outside other objects in
>the CSG. This used to be a problem, since unlike geometric primitives
>a mesh has no mathematically defined "inside". This is no longer a
>problem, because of the addition of the "inside_vector" to POV-Ray.
>
>To determine if a point on an object lies inside a mesh, POV-Ray
>now fires a ray in an arbitrary direction and tests to see how many
>times it intersects the mesh. An odd number of intersections means
>that point is in the mesh, and an even number means it is outside.
>
>This usually works, on most completely closed shapes, although it
>may still fail on meshes which have gaps or holes in them. It may
>sometimes be possible to correct this situation by adding an
>inside_vector to your mesh or mesh2. Then, instead of an "arbitrary"
>direction, POV will use the direction of your inside_vector. By
>choosing a direction that does not point through the gaps on your
>mesh (if possible!) the intersection test for insideness may be
>made more reliable.
>
>In the end, open shapes are simply not always usable in CSG, but
>a carefully chosen inside_vector may sometimes make less than
>perfect meshes suffice.
>
>
>---------------------------------------------------------------

My understanding (supported by a few quick experiments) is that CSG
never works with mesh objects that don't have an inside_vector
specified, even if they are properly closed.

If the mesh is properly closed, then any non-zero inside_vector can be
used and will produce exactly the same result.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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