|
|
High!
geep999 wrote:
> That's interesting. I did experiment a bit with heightfields, but couldn't
> figure out how to wrap it onto a sphere.
What about defining an image_map pigment (preferably a "simple
cylindrical map" with 2:1 edge ratio, otherwise you'll got ugly
distortions toward the poles), probing the color value of each pixel
with eval_pigment() and then calculate each vertex of the spherical
mesh2 by this formula, with long being latitude (0 to 360) and lat being
latitude (90 to -90):
[radius calculated from pixel's RGB values] *
<sin(radians(-long))*cos(radians(lat)), sin(radians(lat)),
cos(radians(-long))*cos(radians(lat))>
Note that long must be negative, otherwise you'll get a mirrored map!
See you in Khyberspace!
Yadgar
Post a reply to this message
|
|