|
 |
If keeping the right aspect ratio is what you need, use this calculation:
X - width of the image_map
Y - height of the image_map
r - radius
r = X / Y / (2 * pi)
This gives you an appropriate radius for a 1 unit high cylinder and full 360
degree wrapping. If you want, let's say, specific X degrees wrapping, multiply
the above by 360/X
Or use a macro:
#macro cyl_wrap(X,Y,Degrees)
(X / Y / (2 * pi) * (360 / Degrees))
#end
Use this for the cylinder's radius
I hope this helps
Margus
Prez Midnite wrote:
>
> Alright, I'm stuck... Can anyone give me advice [or code =) ] on how to
> wrap an image map around a cylinder, like a label on a can? It seems
> like it should be easy, but I just can't get it to look right. I'm sure
> it'll take some math to get the scaling right. The image map is 384 x
> 1400 and the cylinder is whatever size it needs to be to let the image
> map keep it's appearance.
>
> Prez Midnite............... out.
> e-mail:prezmid at disinfo dot net
> http://westwood.fortunecity.com/sander/73/index.html
> "Help me, povray.newusers. You're my only hope..." ;)
Post a reply to this message
|
 |