POV-Ray : Newsgroups : povray.bugreports : Intersection causes quadric to disappear : Re: Intersection causes quadric to disappear Server Time
15 Jul 2024 13:32:05 EDT (-0400)
  Re: Intersection causes quadric to disappear  
From: Le Forgeron
Date: 1 Aug 2015 13:54:09
Message: <55bd07c1@news.povray.org>
Le 01/08/2015 02:32, clipka a écrit :
> Am 29.07.2015 um 22:22 schrieb Le_Forgeron:
>> I have it... you of course had to choose the sole kind of quadric that

>> get "optimized" bounding box in 3.7 : paraboloid.
>> (the 3 axes are impacted)
> After having had a closer look, it seems that we should be careful when

> trying to fix this: The change appears to have in turn been introduced
> to fix some other known issue with the quadric bounding boxes.
> (For reference: The change dates back to Perforce times, and is listed
> in the database as Changelist 3810; it was checked in by Chris on
> 2005-06-13, apparently on behalf of Massimo Valentini.)
Massimo is quite a competent contributor (he provided the fix for the
bezier curve used in the blob).

The code introduced in 3.7 (compared to 3.6) is ok (for bounding box of
quadrics), and should stay (it make a smaller box for paraboloid, as
such objects are only on one side of the half-universe ).

The problem is deeper, and so simple... it's a double sign error in
unlikely situation (well, in regard to quadrics' space, it's unlikely...
it happens for paraboloid, or rather, when the square terms are already
null on the relevant axis: the computed displacement is then inversed,
and the adjustment of the constant term is also bogus (which is somehow
a good thing, as it is part of the identification of the quadric amongst
a few ones: no identification --> bounding box is kept as large as
possible, so the quadric remains visible)

Nevertheless, I have a few situations where 3.6 (and 3.1g) is also bogus
in regard to the computation of bounding box of quadric in intersection
with something else.

E.g. quadric { <1,0,1>,<0,0,0>,<0,-1,0>,-1/4 } (a paraboloid on y,
upside, translated down by 0.25 ) in a cylinder { 0,y,1 } get a bounding
box of -0.87*2 length on x & z (it should be a length of 2)... but it
get back to normal with a cylinder { -y, y , 1 }... for 3.6. For 3.7 it
just get worst.

The patch is in attached delta.txt

If you are interested in more quadric tests, you can use the attached
scene (with frame & clock from 0 to 63)

On attached images, the green & yellow is the intersection with the blue
and red cylinder at the back.... the bounding box is draw in cyan and

Post a reply to this message

Download 'delta.txt' (2 KB) Download 'inter.pov.txt' (15 KB) Download 'i36ter_001.png' (143 KB) Download 'i37ter_001.png' (147 KB) Download 'ifxter_001.png' (145 KB)

Preview of image 'i36ter_001.png'

Preview of image 'i37ter_001.png'

Preview of image 'ifxter_001.png'


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