|
|
Wasn't it Richard who wrote:
>Thanks for the suggestion. But uv_mapping doesn't seem to work for
>cylinders!
It works for me.
#declare SCALE=<3,2.5,3>;
cylinder { <0, -1, 0>, <0 1 0>, 1
open
uv_mapping
texture {
pigment {
image_map {
gif "myimage.gif"
interpolate 2
}
}
finish { ambient 1.0 }
scale SCALE*2 // make texture map isotropic on surface
// needed because both inside and outside of cylinder
// are painted
}
scale SCALE // radius 3, height 5
translate <6,2.5,0>
}
>I tried a "sor" object, but couldn't get it to work. I don't understand
>what the first and last values do in the sor. Does anyone know how to
>draw a cylinder, without end covers?
The start and end points of a SOR are a bit like the extra points you
need for a cubic_spline. I don't think that it's documented what sort of
spline is actually used for generating a SOR, but it's definitely not a
linear spline. To create the appearance of a linear spline with a SOR,
you can simply double up the end points.
To remove the end covers, use the "open" keyword, just like with
"cylinder".
sor {
4, <3, 0>,<3, 0>,<3, 5>,<3, 5> open // radius 3, height 5
uv_mapping
texture {
pigment {
image_map {
gif "myimage.gif"
interpolate 2
}
}
finish { ambient 1.0 }
scale <0.50, 1.0> // make texture map isotropic on surface
// needed because both inside and outside of cylinder
// are painted
}
}
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|