POV-Ray : Newsgroups : povray.advanced-users : Constraining an image map to a certain region of a sphere? : Re: Constraining an image map to a certain region of a sphere? Server Time
25 Jun 2024 03:18:05 EDT (-0400)
  Re: Constraining an image map to a certain region of a sphere?  
From: Jörg 'Yadgar' Bleimann
Date: 20 Jul 2013 17:18:21
Message: <51eafe9d$1@news.povray.org>
Hi(gh)!

On 20.07.2013 10:57, clipka wrote:

> applying spherical warp to a scaled-down version of the image map (with
> the "once" keyword) might do the trick.

Yes, it does! Here is what I programmed after your post:

// begin of code

#declare lat=0;
#declare long=20;

sphere
{
   0, 1
   texture
   {
     pigment
     {
       color rgb <0, 0, 1>
     }
   }
   texture
   {
     pigment
     {
       image_map
       {
         png "testimg.png"
         interpolate 2
         once
       }
       scale <1/360, 1/180, 1>
       translate <(180+long)/360, (90+lat)/180, 0>
       warp
       {
         spherical
         orientation z
         dist_exp 0
       }
       rotate <0, 90, 0>
     }
   }
}

light_source
{
   <0, 0, 1000>
   color rgb 1
}

camera
{
   location <0, 0, 4>
   look_at 0
}

// end of code

This worked fine... but when I tried to use this pigment as an 
isosurface function (yes, of course subtracted from a sphere function!), 
all I got was a featureless sphere, only a hint of relief visible at the 
terminator (grainy shadows) which, on the other hand, indicates that the 
function was *not* constrained to a defined geographical region on the 
sphere! Strange!

(as this is not a binary group, I added a f'up to p.b.i)

See you in Khyberspace!

Yadgar

Now playing: My Own Way, album version (Duran Duran)


Post a reply to this message

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