|
|
Trevor Quayle wrote:
> I'm not sure what you see as the problem
>
I don't seem to be able to make myself clear:
My observation is that gradient apparently does not work at least in the way I
use it. It appears to be working for
gradients x and y and so on but not when the gradient is < 0.1, 1, 0 > . I
cannot tell for sure what happens but a
cylinder with the ends <-0.1,-1,0>, <0.1,1,0> does not get colored correctly
with such a gradient. Apart from scaling and translation effects, the pattern
should at least run perpendicular to the axis. More surprising is the fact that
no matter what I put in for a gradient vector it does not change the pattern.
Again simple things seem to work.
Maybe I put it into a challenge: I give you two points which represent the end
points of a cylinder and I ask you to
color it with a gradient going from say with at point 1 to blue at point 2.
Would you use something like this : ?
#declare p1 = <-0.1,-1,0>
#decalre p2 = <0.1,1,0>
cylinder { p1, p2, 0.2 texture { pigment { gradient (p2-p1) color_map { [][] }
} scale vlength ( p2-p1 ) translate p1 finish{} } }
Not having tried this exact scheme yet I predict that it works if p2-p1 = x or
y or x+y etc. but not if it is anything else.
BTW I am not so sure about the scale. I have had some problems with it too. For
instance a cylinder of length 2.84 needed to
get a scale of 4. But lets deal with one problem at a time.
LE.
Post a reply to this message
|
|