POV-Ray : Newsgroups : povray.general : Problem with CSG intersections : Re: Problem with CSG intersections Server Time
5 Aug 2024 12:21:29 EDT (-0400)
  Re: Problem with CSG intersections  
From: ABX
Date: 23 Sep 2002 02:18:50
Message: <92ctouslmc181hc8kc67r5hgsi7ik692a9@4ax.com>
On Sat, 21 Sep 2002 12:05:42 EDT, "archie" <arc### [at] hotmailcom> wrote:
> Is it possible the write a code that tells wether two CSG objects intersect
> or not? (min_extent and max_extent dont work on CSG objects)
> Think of a "wireframe" cube with a little sphere in the middle. Normally
> they do not intersect, so their intersection supposed to be the void object
> or something the like. So, how do you test if they intersect or not?

Others already answered You that there is no general solution. But there is
also another method not mentioned yet. Since months I have this solution
bookmarked to be written some day as include macro, perhaps as part of iso_csg
library. There are a few algorithms of finding minimum of function based on
sampling of function. So when you can write your csg as iso_csg combination
then you can use one of those optimized algorithms to find location of
minimum. Then you can check value of this minimum and answer if it is lower
than zero which means inside of csg object.

ABX


Post a reply to this message

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