|
![](/i/fill.gif) |
I managed to find an easy tweak that looks pretty good at mapping a
Mercator map onto a sphere. I've no idea if the mathematics are actually
accurate, but I can't see any errors visually.
Simply scale down the sphere by a factor of 2/3, then apply the Mercator
map, then scale it back up again.
#declare S=2/3;
sphere {0,3
scale <1,S,1>
texture {pigment {image_map{ png "world.png" map_type 1} }}
scale <1,1/S,1>
}
The Mercator image I've been testing with has lines of latitude drawn on
it every 30 degrees, and these test points hit those lines exactly.
sphere {-z*3,0.05 pigment {rgb 1} rotate -x*60}
sphere {-z*3,0.05 pigment {rgb 1} rotate -x*30}
sphere {-z*3,0.05 pigment {rgb 1} rotate x*0}
sphere {-z*3,0.05 pigment {rgb 1} rotate x*30}
sphere {-z*3,0.05 pigment {rgb 1} rotate x*60}
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |