POV-Ray : Newsgroups : povray.general : inside_vector ??? : Re: inside_vector ??? Server Time
5 Aug 2024 20:15:47 EDT (-0400)
  Re: inside_vector ???  
From: Charles Fusner
Date: 6 Sep 2002 19:03:26
Message: <3D793482.1030806@enter.net>
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.


---------------------------------------------------------------






-- 
@C[$F];
The Silver Tome ::  http://www.silvertome.com
"You may sing to my cat if you like..."


Post a reply to this message

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