POV-Ray : Newsgroups : povray.newusers : Image mapping onto shere : Re: Image mapping onto shere Server Time
7 Jul 2024 07:39:04 EDT (-0400)
  Re: Image mapping onto shere  
From: Tim Attwood
Date: 20 Jan 2010 16:58:34
Message: <4b577c8a$1@news.povray.org>
Spheres are supported by UV mapping,
so...

sphere {0,1 pigment {
   uv_mapping
   image_map {jpeg "lines3.jpg"}
}}

should work fine. In the more general case
(since not all objects are supported by UV mapping),

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

All this assumes that your starting image is a cylindrical
map. When you are looking at a cylindrical map there is
distortion near the top and bottom of the image, this means
that to do vertical lines, they are no longer straight, but hourglass
shaped in the source image, otherwise the lines will pinch in
narrower at the poles. So they're a bit hard to manually create
in a paint program, but such images are available online for the
earth and most of the planets.


Post a reply to this message

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