POV-Ray : Newsgroups : povray.general : Sweep of a parametric surface Server Time
31 Oct 2024 19:04:57 EDT (-0400)
  Sweep of a parametric surface (Message 1 to 3 of 3)  
From: MCotr
Subject: Sweep of a parametric surface
Date: 4 Nov 2015 09:40:01
Message: <web.563a17f73dc676f64ce99ed0@news.povray.org>
Hi,
I've been trying to solve this problem by looking around, but I didn't find any
solution.

I define a parametric surface in this way

#declare SlabPhC2=   parametric {
    function { u }
    function { v }
    function { MaxDisp*(cosh(sigma*u) - cos(sigma*u) + (sinh(sigma*u) -
sin(sigma*u))*B)}

    <0,0>, <L_Slab,W_Slab>
    contained_by { sphere{0, 10} }
    accuracy 0.01
    precompute 10 x,y,z
    pigment {rgb <0.98, 0.83, 0.58>}
  }


where MaxDisp, sigma, B, L_Slab and W_Slab are all parameters defined elsewhere.
Basically the surface is a rectangular surface bended towards the z axis.

Now I would like to sweep this surface along the z direction for a certain
distance, in order to get a bended slab with a certain tichkness.

Does anybody know how to do it?

Thanks!


Post a reply to this message

From: clipka
Subject: Re: Sweep of a parametric surface
Date: 4 Nov 2015 12:16:05
Message: <563a3d55$1@news.povray.org>
Am 04.11.2015 um 15:36 schrieb MCotr:
> Hi,
> I've been trying to solve this problem by looking around, but I didn't find any
> solution.
> 
> I define a parametric surface in this way
> 
> #declare SlabPhC2=   parametric {
>     function { u }
>     function { v }
>     function { MaxDisp*(cosh(sigma*u) - cos(sigma*u) + (sinh(sigma*u) -
> sin(sigma*u))*B)}
> 
>     <0,0>, <L_Slab,W_Slab>
>     contained_by { sphere{0, 10} }
>     accuracy 0.01
>     precompute 10 x,y,z
>     pigment {rgb <0.98, 0.83, 0.58>}
>   }
> 
> 
> where MaxDisp, sigma, B, L_Slab and W_Slab are all parameters defined elsewhere.
> Basically the surface is a rectangular surface bended towards the z axis.
> 
> Now I would like to sweep this surface along the z direction for a certain
> distance, in order to get a bended slab with a certain tichkness.
> 
> Does anybody know how to do it?

If you have a parametric with the structure

    parametric {
        function { u }
        function { v }
        function { f(u,v) }
    }

then, if I'm not mistaken, a corresponding sweep could be created using
an isosurface with the structure

    isosurface {
        function { abs(z-f(x,y)) }
    }

and a threshold equal to half the desired sweep distance. The result
will be centered around the original parametric.


Post a reply to this message

From: MCotr
Subject: Re: Sweep of a parametric surface
Date: 4 Nov 2015 15:15:00
Message: <web.563a667d8453aeea50f45f380@news.povray.org>
That worked perfectly!! Thanks a lot!!


clipka <ano### [at] anonymousorg> wrote:
> Am 04.11.2015 um 15:36 schrieb MCotr:
> > Hi,
> > I've been trying to solve this problem by looking around, but I didn't find any
> > solution.
> >
> > I define a parametric surface in this way
> >
> > #declare SlabPhC2=   parametric {
> >     function { u }
> >     function { v }
> >     function { MaxDisp*(cosh(sigma*u) - cos(sigma*u) + (sinh(sigma*u) -
> > sin(sigma*u))*B)}
> >
> >     <0,0>, <L_Slab,W_Slab>
> >     contained_by { sphere{0, 10} }
> >     accuracy 0.01
> >     precompute 10 x,y,z
> >     pigment {rgb <0.98, 0.83, 0.58>}
> >   }
> >
> >
> > where MaxDisp, sigma, B, L_Slab and W_Slab are all parameters defined elsewhere.
> > Basically the surface is a rectangular surface bended towards the z axis.
> >
> > Now I would like to sweep this surface along the z direction for a certain
> > distance, in order to get a bended slab with a certain tichkness.
> >
> > Does anybody know how to do it?
>
> If you have a parametric with the structure
>
>     parametric {
>         function { u }
>         function { v }
>         function { f(u,v) }
>     }
>
> then, if I'm not mistaken, a corresponding sweep could be created using
> an isosurface with the structure
>
>     isosurface {
>         function { abs(z-f(x,y)) }
>     }
>
> and a threshold equal to half the desired sweep distance. The result
> will be centered around the original parametric.


Post a reply to this message

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