POV-Ray : Newsgroups : povray.advanced-users : lemon {} revisited : Re: lemon {} revisited Server Time
19 May 2024 22:42:14 EDT (-0400)
  Re: lemon {} revisited  
From: William F Pokorny
Date: 12 Mar 2023 23:35:40
Message: <640e9a0c$1@news.povray.org>
On 3/12/23 08:45, Bald Eagle wrote:
> Perhaps an interesting thing to have available in povr would be a "global
> bounding box" for the scene in the render statistics.  It could help clue scene
> authors in to overlooked distance issues and maybe help track down spuriously
> placed objects, as well as resolve other weird issues.

I'm thinking some about this and unsure how to do it in any general way 
that would not often raise false alarms.

> On to the trivial solution.
> Spindle torus, did you say?


I'll write more about accuracy stuff here so folks are not left too 
'depressed' about higher order inbuilt shapes like the lemon. ;-)

Attached is another image with three shapes left to right where the 
orthographic camera is again pulled back about -2000 from the origin 
where the shapes sit. In fact even -2e6 is no problem.

The middle and right shapes are an isosurface, f_torus 'intersect' 
spindle and on the right is the torus 'intersect' spindle. A good 
question is why do these shapes seem to be immune to the camera set back 
(to the long ray length)?

The answer is both shapes have low order container shapes which are in 
fact the first intersection. The isosurface shape uses either a box or a 
sphere(a) which users specify as the container. The torus internally 
creates a bounding sphere which is the first intersection(a).

On the left is again the lemon, but now it works! It does because I did 
this:

union {
     box { -1,1 pigment {rgbt <0,0,0,1>} } // <--- low order bounding(a)
     lemon {
       <0, -Y, 0>, 0, <0, Y, 0>, 0, r
       texture {pigment {rgb <0.2, 0.2,0>} finish {specular 0.4}}
     //sturm
     }
     translate <-.7,0,-.1>
}

Bill P.

(a) - This kind of outer bounding certainly helps and is often a decent 
work-around, but it is not a general solution. For example, when the 
shapes themselves are large (big interior) - as the ray->surface 
equation and solvers see the shape. Or where the type of csg forces the 
from camera intersections.

The union, clear, first shape bounding can also introduce issues / 
artefacts with other shapes in the scene because that invisible surface 
exists in the scene.

Aside: An attractive argument for representing all shapes with low 
order, mesh approximations is those low order (simpler) ray->surface 
equations tolerate MUCH longer ray to surface distances on cpu float 
hardware.


Post a reply to this message


Attachments:
Download 'behmmisotorusspindle.png' (77 KB)

Preview of image 'behmmisotorusspindle.png'
behmmisotorusspindle.png


 

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