POV-Ray : Newsgroups : povray.advanced-users : CSG Intersection - bounding box question : Re: CSG Intersection - bounding box question Server Time
28 Jul 2024 16:31:36 EDT (-0400)
  Re: CSG Intersection - bounding box question  
From: Peter Duthie
Date: 19 Sep 2004 18:23:19
Message: <414e06d7$1@news.povray.org>
Ahh thanks, that worked really well!

-peter

Mike Williams wrote:
> Wasn't it Peter Duthie who wrote:
> 
>>Will the bounding box of a CSG intersection be the intersection of the 
>>bounding boxes of it's components, or will it be the union of them?  Or 
>>something else entirely?
>>
>>The reason I ask is that I'm taking relatively small 'slices' of basic 
>>constructs using an intersection with a thin box, and I want to know if 
>>the resultant bounding box will be the optimal area where the bounding 
>>box of the construct intersects with the bounding box of the box used to 
>>slice it up.  If not, I can manually calculate the bounding box and 
>>apply it fairly easily, I'd just rather not do that if POV already does 
>>it for me.
> 
> 
> It's easy enough to check. You can get a sort of 2d representation of
> your bounding boxes by adding +MB0 +UD to the command line. (+UD does
> all the work, but for a simple test scene +MB0 ensures that bounding
> gets enabled).
> 
> For a 3d representation of a bounding box you can code it like this
> 
> // Create the thing
> #declare THING =  intersection {
>   box {0,1}
>   sphere {1,0.5}
> }
> 
> // Display the thing
> object {THING pigment {rgb 1}}
> 
> // Display semitransparent bounding box
> box{
>   min_extent(THING),max_extent(THING)
>   pigment {rgbt <1,0,0,0.5>}
> }  
> 
> In my tests, POV was using the intersections of the bounding boxes of
> the components.
>


Post a reply to this message

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