|
![](/i/fill.gif) |
Mike Williams <nos### [at] econym demon co uk> wrote:
> Wasn't it jlew who wrote:
> >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?
>
> #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 {
> radial frequency 2
> 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]
> }
> }
> rotate z*90
> }
> finish { ambient 1 }
> }
>
> Change the frequency value to control how many times the colours go
> round the cone.
>
> --
> Mike Williams
> Gentleman of Leisure
Sweet, thank you Mike! I figured there was something like this but never
happened upon the radial keyword.
Post a reply to this message
|
![](/i/fill.gif) |