POV-Ray : Newsgroups : povray.bugreports : Slice of apple pie : Re: Slice of apple pie Server Time
23 Apr 2024 10:54:43 EDT (-0400)
  Re: Slice of apple pie  
From: William F Pokorny
Date: 13 Apr 2023 07:50:45
Message: <6437ec95$1@news.povray.org>
On 4/11/23 06:40, Bald Eagle wrote:
>> I believe what your are seeing is the fact the disc, like the plane, is
>> defined in the code as having and inside (as being a 'basic object'
>> rather than a 'patch object') so it can be used in CSG.

> That's certainly what it looks like to me.   That slice is HUGE.

Thanks for the confirmation.

I spent a little time this morning looking at the code and playing. It 
turns out the disc is auto bounded using the radius & other info - as it 
can. Where flat relative to the x,z plane the box y min and max values 
are set to the initial vector, y value. x and z to the +-r, +-r values. 
The automatic bounding box has is infinitely thin and it is rays hitting 
this box determine when we look for ray -> surface intersections.

The bounding determination, where things are not simple in being at the 
origin and axis aligned, is more complicated.

An alternative to clipping the ray-surface intersections internal to a 
shape, would be to use two opposing discs with a very small space 
between them (tiny inside sliver region) like this:

#declare DiscOrigin = <0,0,0>;
#declare DiscNormal = <0,1,-1>;
#declare I01 = intersection {
     Wedge(275)
     disc  {
         DiscOrigin+(+1e-8*DiscNormal),
         +1*DiscNormal, 1, 0.5 }
     disc  {
         DiscOrigin+(-1e-8*DiscNormal),
         -1*DiscNormal, 1, 0.5 }
     pigment { color Green }
}

This, as a generic approach, is likely more stable numerically as any 
'edge noise' has to happen between the to opposing discs. Remembering 
here too discs can have holes.

Bill P.


Post a reply to this message

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