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
4 Dec 2022 19:24:06 EST (-0500)
  Re: Strange results from min_extent and max_extent  
From: Thomas de Groot
Date: 18 Feb 2019 02:31:55
Message: <5c6a5f6b$1@news.povray.org>
On 17-2-2019 21:14, clipka wrote:

>> I never noticed this before while I extensively use these features. Is 
>> this a bug or am I stupid?
> The latter. (Hey, you asked a straightforward question, so you deserve a 
> straightforward answer :))

I knew I had this coming of course, so you are welcome ;-)

> You shouldn't be using `disc` to cut away a plane. The fact that it 
> works is nothing more than a quirk, and the person who made it so should 
> be tarred and feathered. Use straightforward `plane` instead.

Yes, I was aware of the fact that disc is a problem child, but being 
stupid of course...

> A couple of things to note in this context:
> - The `min_extent` and `max_extent` functions are only guaranteed to 
> provide _bounds_ for the extent of the object. The actual extent may be 
> smaller. Considerably smaller in some cases.
> - As a matter of fact `min_extent` and `max_extent` give you the extent 
> of the object's _bounding box_.
> - `difference` is actually implemented as an intersection, with all 
> children except the first being inverted.

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.

> - The bounding box of an intersection is computed as the intersection of 
> the children's bounding boxes.

That is pretty straightforward.

> - Inverted objects are typically infinite
> - Infinite objects have an infinite bounding box.

Hmmm... ok. That makes sense and shows what can go wrong...

> - The plane gets special treatment in the computation of intersection 
> bounding boxes because it is too useful as a cutting tool.

Yes, I fully agree with that one!


Post a reply to this message

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