POV-Ray : Newsgroups : povray.general : Lemon : Re: Lemon Server Time
1 Aug 2024 04:12:25 EDT (-0400)
  Re: Lemon  
From: Mike Williams
Date: 17 Mar 2006 07:20:49
Message: <hdq74DAPgqGEFw+p@econym.demon.co.uk>
Wasn't it Shark who wrote:
>Hi,
>
>I'm trying to create a shape called a "lemon"
>(http://mathworld.wolfram.com/Lemon.html) using POV-Ray, but am
>encountering problems.
>I need it to have a well-defined inside, so simply clipping a spindle torus
>won't work.
>Also, I'm unsure about the exactness when using a lathe or SOR object.
>
>Does anyone have any suggestions?

Try this:

#declare r1 = 0.6;
#declare r2 = 1.0;                        
#declare  F = function {x*x + y*y - r2*r2}

isosurface {
  function { F(sqrt(x*x+z*z)+r1, y, z) }
  max_gradient 3.1
  contained_by{sphere{0,r2}}
  pigment {rgb <1,1,0>}
}

max_gradient will need tweaking for different values of r1 and r2.
-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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