POV-Ray : Newsgroups : povray.newusers : Image mapping onto shere : Re: Image mapping onto shere Server Time
7 Jul 2024 08:27:44 EDT (-0400)
  Re: Image mapping onto shere  
From: clipka
Date: 10 Feb 2010 07:31:09
Message: <4b72a70d$1@news.povray.org>
geogeo schrieb:
> "Tim Attwood" <tim### [at] anti-spamcomcastnet> wrote:
>> [...]
>> sphere {0,1 pigment {
>>    image_map {
>>       jpeg "lines3.jpg"
>>       once // don't repeat the image
>>       map_type 2 // cylindrical
>>    }
>>    translate <0,-0.5,0> // center the image on origin
>>    scale <1,2,1> // double the height to match diameter of sphere
>> }}
>>
>> [...] such images are available online for the
>> earth and most of the planets.
> 
> Many thanks, works fine! I already had a suitable POVray cylinder image for
> Earth but hadn't twigged the uv-mapping aspect. From a few tests I've done it
> seems the aspect ratio of the image is not important - it gets stretched to
> cover the sphere. Very handy.

For completeness' sake, be advised that the typical projection used for 
planetary "image maps" is "equidistant cylindrical" (aka "plate carree") 
projection, that is the coordinates in the image correspond to the 
latitudinal and longitudinal angles - which does NOT match POV-Ray's 
map_type 2, but rather map_type 1 ("spherical").

The terms used in POV-Ray are a bit misleading, as in cartographers' 
terms both are "normal cylindrical" projections, with type 2 being very 
rarely used in cartography, if at all.


Post a reply to this message

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