POV-Ray : Newsgroups : povray.newusers : Scaling question... : Re: Scaling question... Server Time
2 Nov 2024 15:27:34 EDT (-0400)
  Re: Scaling question...  
From: Mike Williams
Date: 26 Nov 2003 14:29:02
Message: <XBNd8GAw6Px$Ew+j@econym.demon.co.uk>
Wasn't it Carl Hoff who wrote:
>Thanks.  I'm glad it wasn't just me fighting a syntax problem though if it
>had I guess that would have been the easiest to fix.
>
>I've only been playing with POV-Ray now for about 2 months and as
>yet haven't got to the point of playing with isosurfaces.  I guess its time
>to learn.
>
>If someone beats me to the bunch... what I'm trying now to find is the
>equation I need to use for an isosurface that looks like:
>
>(y/a1)^2+(z/b1)^2=1   in the x=0 plane
>
>and
>
>(y/a2)^2+(z/b2)^2=1   in the x=x0 plane
>


#declare aa=max(a1,a2);
#declare bb=max(b1,b2);
isosurface {
  function {    
      pow((y/(a1+(a2-a1)*x/x0)),2)
     +pow((z/(b1+(b2-b1)*x/x0)),2)
     -1 
  }
  max_gradient 2.8
  contained_by{box{<0,-aa,-bb><x0,aa,bb>}}
}

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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