POV-Ray : Newsgroups : povray.binaries.images : How do you want your eggs today ? [78Kbu] : Re: How do you want your eggs today ? [78Kbu] Server Time
16 Aug 2024 06:14:43 EDT (-0400)
  Re: How do you want your eggs today ? [78Kbu]  
From: Grey Knight
Date: 11 Mar 2002 07:10:26
Message: <3C8C9EB1.EF577222@namtar.qub.ac.uk>
"Sir Charles W. Shults III" wrote:
> 
>     Are you writing a macro for this?  I have used two spheres, one round
> and one elongated, chopped in half and fused together to make perfect eggs
> before.  Sounds like a useful and simple tool.
Me too. In fact I use this:

#macro ovoid (Center, EquatorRadius, MinRadius, MaxRadius, Directrix)
  union{
    difference{
      sphere{ 0,1 scale (MinRadius/EquatorRadius) }
      plane{ -y, 0 }
    }
    difference{
      sphere{ 0,1 scale (MaxRadius/EquatorRadius) }
      plane{ y, 0 }
    }
    rotate_to(Directrix-Center)
    scale EquatorRadius
    translate Center
  }
#end

Where rotate_to() is something like Reorient_Trans(); it rotates from +y
to the specified vector.

-- 
signature{
  "Grey Knight" contact{ email "gre### [at] yahoocom" }
  site_of_week{ url "http://digilander.iol.it/jrgpov" }
}


Post a reply to this message

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