|
![](/i/fill.gif) |
Okay, here's another one. This time, I simply adapted the code to work
in three dimensions instead of two. I did not even attempt to center the
pyramid in relation to itself.
Amazingly (at least to me) this render took only 3 minutes, 35 seconds!
It uses one 8x8 area_light and 'goodish' radiosity settings. About three
seconds and it was parsed.
Here's the basic code, for those interested. It's not super-efficient,
it simply works :)
//begin the code!
#declare obj=sphere{0,.5}
union{
#local Y=1;
#while(Y<17)
#local Z=0;
#while(Z<Y)
#local X=0;
#while(X<Y)
#local t1=
inside(obj,<X-1,Y-1,Z-1>);
#local t2=
inside(obj,<X-1,Y-1,Z>);
#local t3=
inside(obj,<X,Y-1,Z-1>);
#local t4=
inside(obj,<X,Y-1,Z>);
#local T=t1+t2+t3+t4;
#local obj=
union{
object{obj}
#if(T=1|T=3)
box{-.5,.5 translate<X,Y,Z>}
#else sphere{0,.1}
#end
}
#local X=X+1;
#end
#local Z=Z+1;
#end
#local Y=Y+1;
#end
}
object{obj pigment{rgb .7} rotate z*180+y*55 translate<10,10.5,0>}
//end code
Q's & C's, welcome as usual~
-Sam
Post a reply to this message
Attachments:
Download 'pascal_blocks_3d.jpg' (75 KB)
Preview of image 'pascal_blocks_3d.jpg'
![pascal_blocks_3d.jpg](/povray.binaries.images/attachment/%3C414C5F23.8000503%40hotmail.com%3E/pascal_blocks_3d.jpg?ttop=441697&toff=6100&preview=1)
|
![](/i/fill.gif) |