|
![](/i/fill.gif) |
Been having a little fun with this today. A slight modification I have made,
converting the pattern to a function to evaluate directly rather than building
a heightfield for each layer. Depending on the resolution, this can have a
little bit of an impact on parse time as it takes time to build the
heightfield, even if it isn't rendered. It seems to produce similar results,
but I can get it exact, likely only because of not getting the right
orientation/location of the pattern being evaluated. (and a slight change in
the way I set up the while loops, but you can ignore that).
#declare f_hf= function{
pattern{
agate
turbulence chaos
scale resolution
}
}
#declare bloks=
union{
#declare zet=1;#while (zet<=resolution)
#declare iks=1;#while (iks<=resolution)
#declare ueps=1;#while (ueps<=resolution)
#if (f_hf(iks,zet,ueps)>(1-densiti))
box{-0.4,0.4 translate<iks,zet,ueps>}
#end
#declare ueps=ueps+1;#end
#declare iks=iks+1;#end
#declare zet=zet+1;#end
}
-tgq
Post a reply to this message
|
![](/i/fill.gif) |