POV-Ray : Newsgroups : povray.advanced-users : Paraboloid with thickness Server Time
29 Mar 2024 10:23:09 EDT (-0400)
  Paraboloid with thickness (Message 1 to 5 of 5)  
From: Mike Horvath
Subject: Paraboloid with thickness
Date: 26 Jan 2021 02:56:19
Message: <600fcb23$1@news.povray.org>
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?



Mike


Post a reply to this message

From: BayashiPascal
Subject: Re: Paraboloid with thickness
Date: 26 Jan 2021 05:30:00
Message: <web.600fee1222c070976396ca3e0@news.povray.org>
Hi Mike,

I think you could use an isosurface like this:

#declare _thickness = 1.0;
#declare thickParaboloid =
  function { abs(pow(x,2) + pow(z,2) - y) - _thickness * 0.5}

isosurface {
  function { thickParaboloid(x,y,z) }
  max_gradient 15.0
  contained_by { box { -5, 5 } }
  texture { pigment { color rgb 1.0 } }
}

Or, you could approximate it with a lathe object.

Hope it will help.

Pascal


Mike Horvath <mik### [at] gmailcom> 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?
>
>
>
> Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: Paraboloid with thickness
Date: 26 Jan 2021 17:31:44
Message: <60109850$1@news.povray.org>
On 1/26/2021 5:26 AM, BayashiPascal wrote:
> Hi Mike,
> 
> I think you could use an isosurface like this:
> 
> #declare _thickness = 1.0;
> #declare thickParaboloid =
>    function { abs(pow(x,2) + pow(z,2) - y) - _thickness * 0.5}
> 
> isosurface {
>    function { thickParaboloid(x,y,z) }
>    max_gradient 15.0
>    contained_by { box { -5, 5 } }
>    texture { pigment { color rgb 1.0 } }
> }
> 
> Or, you could approximate it with a lathe object.
> 
> Hope it will help.
> 
> Pascal
> 
> 
> Mike Horvath <mik### [at] gmailcom> 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?
>>
>>
>>
>> Mike
> 
> 
> 
> 
> 


Thank you! I will test it out.


Mike


Post a reply to this message

From: Cousin Ricky
Subject: Re: Paraboloid with thickness
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

From: BayashiPascal
Subject: Re: Paraboloid with thickness
Date: 28 Jan 2021 23:20:00
Message: <web.60138beb22c070976396ca3e0@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:
> 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.

Right. Thanks for improving my lazy solution.

Pascal


Post a reply to this message

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