POV-Ray : Newsgroups : povray.advanced-users : Paraboloid with thickness : Re: Paraboloid with thickness Server Time
24 Apr 2024 22:16:40 EDT (-0400)
  Re: Paraboloid with thickness  
From: Cousin Ricky
Date: 28 Jan 2021 21:13:16
Message: <60136f3c$1@news.povray.org>
On 2021-01-26 3:56 AM (-4), Mike Horvath wrote:
> How would I create a paraboloid with thickness N?
> 
> I'm guessing I need need to create an offset surface of some sort. Does 
> it need to be an isosurface?

My immediate thought was that this is a job for the quadric primitive. 
Alas, after two days of weird results, it became clear that the quadric 
has bounding pathologies, even in POV-Ray 3.8.  I knew there was a bug 
in 3.7's quadric--in fact, I discovered it; but whatever was done to fix 
it hasn't completely resolved the bounding issues.

However, I found that poly { 2 } does not have these problems.

The following code creates a paraboloid with the apex downward, apex at 
the origin, radius R, height H, and wall thickness T:

----------[BEGIN CODE]----------
// parameters
#declare R = ;
#declare H = ;
#declare T = ;

// derived
#declare A = H / pow (R, 2);
#declare T1 = (2 * H * T) / (sqrt (1 + pow (2 * H / R, 2)) * R);
#declare A1 = (H - T) / pow (R - T1, 2);

intersection
{ cylinder { 0, H * y, R }
   poly { 2, <A, 0, 0, 0, 0, 0, -1, A, 0, 0> }
   poly { 2, <-A1, 0, 0, 0, 0, 0, 1, -A1, 0, -T> }
}
-----------[END CODE]-----------

T1 is the horizontal component of the wall thickness at height H.  It 
was derived by taking the derivative of the parabola in the x-y plane at 
x and plugging it into the Pythagorean equation.

One thing I noticed about BayashiPascal's code is that the contained_by 
box is much larger than the paraboloid.  All that extra volume slows 
down the rendering of the isosurface, so you’ll want to tighten that up. 
  By using box { <-R, -_thickness / 2, -R>, <R, 5, R> } where R = sqrt 
(5 + _thickness / 2), I was able to reduce the max_gradient to 6.4 and 
cut 1/3 off the render time.


Post a reply to this message

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