POV-Ray : Newsgroups : povray.beta-test : Strange results from min_extent and max_extent : Re: Strange results from min_extent and max_extent Server Time
19 Jun 2021 18:43:45 EDT (-0400)
  Re: Strange results from min_extent and max_extent  
From: clipka
Date: 18 Feb 2019 03:53:59
Message: <5c6a72a7$1@news.povray.org>
Am 18.02.2019 um 08:31 schrieb Thomas de Groot:

> OK. So, from the above, why is the difference sphere/box (see my example 
> image in p.b.i and p.b.s-f) calculating a min_extent.y location 
> corresponding to the base of the sphere? I do not grasp that really.

     difference {
       sphere { ... }
       box { ... }
     }

is the same as

     intersection {
       sphere { ... }
       box { ... inverse }
     }

The sphere has a bounding box of CENTER-RADIUS to CENTER+RADIUS.

The box _would_ normally have a bounding box of CORNER1 to CORNER2, but 
since it's inverted, it has a bounding box of -INFINITY to +INFINITY. (*)

The intersection has a bounding box equal to the intersection between 
the sphere's bounding box and the box's bounding box.

The intersection of any finite range A and an infinite range B is equal 
to the finite range A.

Thus, the intersection has a bounding box of CENTER-RADIUS to 
CENTER+RADIUS, just like the sphere.


Post a reply to this message

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