|
![](/i/fill.gif) |
Trevor Quayle wrote:
> I think the gradient vector gets normalized, it is only used as a direction,
> not a scale.
> You should therefore, add a scale statement (and probably translate the
> pattern to the base of the cylinder)
Yes. This is alright. I scaled and translated it. This example works, there
may however be a problem with scale also. What does not work is any non-trivial
vector. If scale and translate is not right, one should at least see that the
pattern being permendicular to the axis of the cylinder. However this is not
the case.
Try
camera {
right x
up y
location <0,0,-3>
look_at < 0,0,0>
}
light_source {
<0,100,-10>
color rgb <1,1,1>
}
background {color rgb 1}
cylinder {
<-0.1,-1,0>, <0.1,1,0>, 0.2
texture {
pigment {
gradient <0.2,2,0>
color_map {
[ 0.0 color rgb <1, 1, 1> ]
[ 0.5 color rgb <1, 0, 0> ]
[ 1.0 color rgb <0, 0, 1> ]
}
}
// scale 4
// translate <-0.1,-1,0>
finish {
ambient 0.8
diffuse 0.5
specular 0.1
roughness 0.01
}
}
}
Post a reply to this message
|
![](/i/fill.gif) |