POV-Ray : Newsgroups : povray.newusers : image_map on deformed cylinder : Re: image_map on deformed cylinder Server Time
2 Nov 2024 11:23:48 EDT (-0400)
  Re: image_map on deformed cylinder  
From: Mike Williams
Date: 29 Apr 2004 01:05:20
Message: <zy4gSAAPPEkAFw+d@econym.demon.co.uk>
Wasn't it Dr. Doogie who wrote:
>Hi everyone,
>
>I need to map an image on a deformed cylinder (<0,0,0> , <0,1,0>, 25 scale
><0.5, 1, 1.5> )
>
>When i map an image on it, it's not correct. There are mapping imperfections
>on the narrowest edges (on the 2 sides where the radius of curvature is at
>its lowest). The part of the image mapped on these sides is more stretched
>(horizontally) than the rest. (Actually i map an image that features some
>number like 123456790 and the 2 that are on the edges are lot more wider
>than the others).
>
>Is there a better way to map an image on a deformed cylinder ?

Try moving the "scale <0.5, 1, 1.5>" out of the cylinder section and
down next to the "scale <1,100,1>" so that it scales the texture as well
as the cylinder.

I imagine that that might push things too far for what you're trying to
achieve, so you'll need to find a happy medium, scaling by something
inside the cylinder section and then by something else after the
texture. Perhaps something like this, adjusting S1 and S2 to taste:

#declare S1=1.1;
#declare S2=2;

...

 cylinder { <0, 0, 0>, <0, 1, 0>, 25
  scale <S1, 1, S2>
 }

...

 }
 scale<0.5/S1,1,1.5/S2>
 scale<1,100,1>
}

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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