|
|
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
|
|