|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> I changed a bit to get this image:
> http://www.harry-arends.nl/werkgroep/images/WarpText.png
> But as can be seen it warpt totatly around. The height is correct but it should
> cover only 1/3rd of the cylinder.
>
> #declare label =
> object{
> cylinder{<0,0,0><0,70,0>dia/2+.25
> pigment{
> image_map {
> jpeg "RE55s.jpg"
> map_type 2
> once
> interpolate 4
> }
> scale <1,24,1> // labelheight
> }
> }
> }
>
>
>
map_type 1 and map_type 2 always cover the full cyrconference. NO
scaling can change that.
Scaling can only change the vertical extent.
For what you want, a warp is required. Your sample becomes this:
#declare label =
object{
cylinder{<0,0,0><0,70,0>dia/2+.025
pigment{
image_map {
jpeg "RE55s.jpg"
scale<1/3,1,1>
warp{cylindrical}
once
interpolate 4
}
scale <1,24,1> // labelheight
}
}
}
The scale ensure that the image will cover 1/3 or the circonference.
As it is, the label will be 1 unit high. Adjust the Y component to get
the desired hight.
You can use scale<Angle/360, Hight, 1> to get exact controll.
"once" is required. Without it, the image will get repeated 3 times
around the cylinder, and all the way up and down the cylinder. In this
case, 2.9 times.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> On 21/06/2013 4:56 PM, James Holsenback wrote:
>>
>> yeah ... i'm curious why the orig poster got his example to work using
>> planar map_type and spherical warp. there MUST be some other unknowns
>> going on. many moons ago i placed a label on cylinder shape (horizontal
>> orientation) using method above ... iirc i used map_type 2 and some
>> uneven scaling, with translate
>
> Maybe the spherical warp undoes the distortion of using planer mapping
> on a cylinder.
>
On the contrary, it INTRODUCE some distortion. As you move away from the
X-Z plane, the image get stretched.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 21/06/2013 7:44 PM, Alain wrote:
>> Maybe the spherical warp undoes the distortion of using planer mapping
>> on a cylinder.
>>
>
> On the contrary, it INTRODUCE some distortion. As you move away from the
> X-Z plane, the image get stretched.
I thought that something like that might be the case. So Jim's question
still stands.
--
Regards
Stephen
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> On 21/06/2013 7:44 PM, Alain wrote:
>>> Maybe the spherical warp undoes the distortion of using planer mapping
>>> on a cylinder.
>>>
>>
>> On the contrary, it INTRODUCE some distortion. As you move away from the
>> X-Z plane, the image get stretched.
>
> I thought that something like that might be the case. So Jim's question
> still stands.
>
If the sylinder is short, the distortion is not to apparent. Also, in
*some* cases, a spherical mapping can be used on a cylinder for good effect.
On this cylinder, it's OK...
cylinder{y, -y, 1 }
Using spherical mapping, the cap get a recognisable image, but the image
is distorted. The cylinder been short, the distortion is still low
enough to not been realy noticeable.
Using the correct cylindrical mapping, the caps will only show a radial
pattern corresponding to the top layer of pixels from the image, but the
image on the sides is distortion free.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I haven't used this yet:
http://lib.povray.org/searchcollection/index2.php?objectName=Labeller&contributorTag=chrisb
A solution?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|