POV-Ray : Newsgroups : povray.documentation.inbuilt : Mesh2 and the inside() function Server Time
24 Apr 2024 03:29:55 EDT (-0400)
  Mesh2 and the inside() function (Message 1 to 2 of 2)  
From: Tom York
Subject: Mesh2 and the inside() function
Date: 23 Jan 2005 08:25:01
Message: <web.41f3a5368c1cfb422ff34a90@news.povray.org>
Hi,

I recently started experimenting with mesh2 objects. According to the manual
these objects normally have no well-defined inside, and therefore the float
function inside() obviously does not work with them.

I naively thought that adding the inside_vector statement to a mesh2
definition would (in addition to fixing CSG operations) allow inside() to
operate normally on such objects, but it doesn't seem that way.

The inside() function will still report a non-solid object error when given
an object identifier for a mesh2 whether it has inside_vector defined or
not.

If this is correct behaviour, could a note be added to the documentation for
inside() stating that adding inside_vector to a mesh2 will not prevent
inside() vector from reporting a non-solid object error even if the mesh2
is well-behaved? Or am I the only person who assumed that a mesh2 with
inside_vector should work with the function inside(), given that it works
with CSG?

Thanks,

Tom


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Mesh2 and the inside() function
Date: 23 Jan 2005 10:12:31
Message: <41f3bedf$1@news.povray.org>
In article <web.41f3a5368c1cfb422ff34a90@news.povray.org> , "Tom York" 
<alp### [at] zubenelgenubi34spcom> wrote:

> The inside() function will still report a non-solid object error when given
> an object identifier for a mesh2 whether it has inside_vector defined or
> not.

As 2.4.2.3.1 Solid Mesh points out, the inside_vector is there to allow you
to use CSG with meshes.  It also explains to you why POV-Ray needs the
inside-vector for that.  If you follow the second paragraph in that section
you can work out why inside() cannot benefit from this: It does not shoot a
ray, all it can do is see if the point is inside or not, and for that
obviously more is needed than knowing which side of the mess is inside and
which one is outside (especially if the mesh is not closed).

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

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