POV-Ray : Newsgroups : povray.general : CSG mesh bug : Re: CSG mesh bug Server Time
4 Aug 2024 16:12:08 EDT (-0400)
  Re: CSG mesh bug  
From: Johannes Dahlstrom
Date: 27 Mar 2003 05:30:04
Message: <web.3e82d27b9c39944cf7cbce3c0@news.povray.org>
Mark Weyer wrote:
>Just as I would expect. difference {A B} does the same as
>intersection {A object {B inverse}}. inverse can have no effect on
>patch objects such as a mesh, because they have no inside or outside.

Well, closed ("well-behaving") meshes DO have a well defined interior, and
the "insideness" algorithm is rather trivial (just trace a ray from the
point in question to some direction (inside_vector), if there are an even
number of intersections, the point is outside, else inside). It can fail,
though, if the ray happens to on the exactly same plane as some of the
triangles being tested. This is what seems to be happening here. The
inside_vector should be chosen carefully to not be parallel to any of the
triangles in a mesh.


Post a reply to this message

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