|
![](/i/fill.gif) |
I have a cone to which I would like to apply a rainbow-like gradient fill.
The closest I have gotten is a "gradient y color_map", which looks okay,
except that I would like the color bands to be parallel to the long edges
of the cone, and increase proportionally to the radius (as opposed to the
fixed with bands parallel to the center axis of the cone). Is there a way
to do this? Here's my code, thanks for any advice.
#include "colors.inc"
camera {
location <0,0,-3>
look_at 0
}
light_source {<0,0,-10>, White}
cone {
<-1,0,0>, .1, <1,0,0>, .5
texture {
pigment {
gradient y color_map {
[0.0 color Violet]
[1/6 color Blue]
[2/6 color Green]
[3/6 color Yellow]
[4/6 color Orange]
[5/6 color Red]
[1.0 color Violet]
}
}
}
finish { ambient 1 }
}
Post a reply to this message
|
![](/i/fill.gif) |