|
![](/i/fill.gif) |
Hi,
I'm trying to vary the size of each sphere in a 100x100 grid by sampling a bozo
pigment. I
haven't used eval_pigment before and I'm finding that it is returning a color
expression, and
I require a float, but I cannot work out how to convert between the two. I am
requiring a
float in the range 0..1.
Here's my code:
#declare MyPigment =
pigment {
bozo
scale 100
color_map {
[0 rgb 0]
[1 rgb 1]
}
}
union {
#declare LR=1;
#while (LR<=100)
#declare IO=1;
#while (IO<=100)
#local Radi = eval_pigment (MyPigment,<LR,0,IO>);
sphere {<0,0,0>,Radi translate <LR-50,0,IO-50> pigment {rgb <1,1,0>}}
#declare IO=IO+1;
#end
#declare LR=LR+1;
#end
}
All the best,
Andy Cocker
Post a reply to this message
|
![](/i/fill.gif) |