|
![](/i/fill.gif) |
On 3/18/2011 10:51 AM, stbenge wrote:
> This can be accomplished with nested gradient x/y/z patterns and
> color_map #while loops.
Here's the basic idea:
#declare N_UnitsX = 32;
#declare N_UnitsY = 32;
#declare N_UnitsZ = 32;
#declare RSEED = seed(1001);
box{0, 1
pigment{
gradient z
pigment_map{
#local Z=0;
#while(Z<N_UnitsZ)
[Z/N_UnitsZ
gradient y
pigment_map{
#local Y=0;
#while(Y<N_UnitsY)
[Y/N_UnitsY
gradient x
pigment_map{
#local X=0;
#while(X<N_UnitsX)
[X/N_UnitsX
rgb <rand(RSEED),rand(RSEED),rand(RSEED)>
]
#local X=X+1;
#end
}
]
#local Y=Y+1;
#end
}
]
#local Z=Z+1;
#end
}
}
finish{ambient 1}
translate -1/2
}
Post a reply to this message
|
![](/i/fill.gif) |