POV-Ray : Newsgroups : povray.general : Problem with CSG intersections : Re: Problem with CSG intersections Server Time
5 Aug 2024 12:14:05 EDT (-0400)
  Re: Problem with CSG intersections  
From: Christoph Hormann
Date: 21 Sep 2002 12:29:56
Message: <3D8C9E83.86DFFB20@gmx.de>
archie wrote:
> 
> Is it possible the write a code that tells wether two CSG objects intersect
> or not? 

Not in the general case.  You can of course test it in some special
situations (simplest being the test whether two spheres intersect).

(min_extent and max_extent dont work on CSG objects)

That's not true, min_extent and max_extent work for all finite objects. 
Of course they won't help you finding out if the objects actually
intersect.

> 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?

Simply doing 'trace()' along the edges of the wireframe on the sphere
should be sufficient in this case (assuming that the wireframe lines are
very thin).

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

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