POV-Ray : Newsgroups : povray.general : Offset surface : Re: Offset surface Server Time
29 Apr 2024 10:52:18 EDT (-0400)
  Re: Offset surface  
From: Tor Olav Kristensen
Date: 28 Jul 2018 23:35:01
Message: <web.5b5d34ada78a37509cbeb2fe0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
>...
> Perhaps someone better versed in the parametric object can determine why I can't
> get it to render the full surface, since the exact same equations are used in
> the nested loop of spheres to correctly approximate the surface.
>...

>...
> // --------------------------------------- parametric surface --------------
> #declare Parallel = parametric {
>  function {EllipseX (u, v)}
>  function {EllipseY (u, v)}
>  function {EllipseZ (v)}
>  <0, pi>, <0, 2*pi>  // start, end (u,v)
>  contained_by {sphere {0, R}}
>  max_gradient 50
>  accuracy 0.005
>  precompute 5 x,y,z
>  texture {pigment{ color rgb <0, 1, 0>}}
> }
>
> //object {Parallel}

Try this:

parametric {
    function { a*cos(u)*cos(v) }
    function { b*cos(u)*sin(v) }
    function { c*sin(u) }
    <0, 0>, <2*pi, pi>
    contained_by {
        sphere { <0, 0, 0>, max(a, b, c) }
    }
    max_gradient max(a, b, c)
    accuracy 1e-6
    precompute 10 x, y, z
    pigment { color Green }
}

The main problem was your boundaries for u and v.

--
Tor Olav
http://subcube.com


Post a reply to this message

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