POV-Ray : Newsgroups : povray.programming : oblate spheriod : Re: oblate spheriod Server Time
2 May 2024 10:25:45 EDT (-0400)
  Re: oblate spheriod  
From: Christian Froeschlin
Date: 15 Apr 2007 10:45:25
Message: <46223a85$1@news.povray.org>
davidafisher wrote:

> I'm trying to emulate the earth which is an oblate spheriod - flattened
> sphere. The correct result does not occur by scaling the y axis of a sphere

The formula (http://mathworld.wolfram.com/OblateSpheroid.html)
certainly looks just like a sphere with a different scaling for
one axis. Of course, you can also use an isosurface, which has
the advantage that you can add terrain elevation later.

#declare RADIUS_EQUATORIAL = 6.378137;
#declare RADIUS_POLAR      = 6.356752;

isosurface
{
   #local ALPHA_INV = 1/RADIUS_EQUATORIAL;
   #local C_INV     = 1/RADIUS_POLAR;
   function  {ALPHA_INV * (pow(x,2) + pow(z,2)) + C_INV * pow(y,2) - 1}
   max_gradient 2
   contained_by { sphere {0,6.5} }
   pigment {color White}
}


Post a reply to this message

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