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