POV-Ray : Newsgroups : povray.general : How to adjust image_map? : Re: How to adjust image_map? Server Time
25 Apr 2024 19:20:12 EDT (-0400)
  Re: How to adjust image_map?  
From: Bald Eagle
Date: 21 Feb 2020 14:00:01
Message: <web.5e5027eb8411a31b4eec112d0@news.povray.org>
"Kima" <nomail@nomail> wrote:

> In my case, scale<0.5,0.5, 1> leads to half-height but still full (360-degree)
> cylindrical wrap.

I think that might be the nature of the cylindrical mapping mechanism.
If you want to make it only cover half of the circumference, you might need to
buffer the image on either side with half as many pixels in a transparent
"color".

But I did get what I think you want using uv_mapping.

#version 3.8;

global_settings {
 assumed_gamma 1
}

#include "colors.inc"


light_source {<1, 3, -3> color White}
sky_sphere {pigment {White}}

#declare Aspect = image_width/image_height;
camera {
 location <0, 2, -4>
 right x*Aspect
 up y
 sky y
 direction z
 look_at <0, 1, 0>
}

#declare YSize = 1.6;
 #declare ImageMap =
          pigment {image_map {"/home/oem/Documents/POV-Ray-3.8/0.gif" once} };
 #declare Resolution = max_extent (ImageMap);
 #declare Resolution = Resolution + <0, 0, 1>;

#declare Lathe =
lathe{
  cubic_spline 8,
     < 0.00, 0.00>,
     < 0.60, 0.00>,
     < 0.72, 0.44>,
     < 0.31, 0.93>,
     < 0.49, 1.26>,
     < 0.48, 1.35>,
     < 0.43, 1.56>,
     < 0.16, 1.60>
      uv_mapping
 pigment {Blue}

     texture{
      ImageMap translate <-0.5, 0, 0>
      scale Resolution*(1/Resolution.y)*YSize
      scale x*pi*(0.72/2)/2
     }

}

object {Lathe}

object {Lathe rotate -y*90 translate  -x*2}

object {Lathe rotate y*90 translate  x*2}


Post a reply to this message

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