|
![](/i/fill.gif) |
I have just downloaded POV-RAY and and am having my first real go at it.
Is there a better way than this of achieving the pyramid of spheres?
=====================================================================
#include "colors.inc"
#include "metals.inc"
camera {
location <0, 10, -15>
look_at <0, 0, 0>
}
light_source { <2, 14, -23> color White}
#declare s = 5;
union {
#declare l = 0;
#while (l < s)
union {
#declare xco = 0;
#declare zco = 0;
#while (zco < s - l)
union {
#while (xco < 5 - l)
sphere {
<0, 0, 0>, 1
texture {
T_Chrome_5E
}
translate x * 2 * xco
}
#declare xco = xco + 1;
#end
translate -4 * x
translate 2 * zco * z
#declare xco = 0;
#declare zco = zco + 1;
}
#end
translate y * (l * 1.25)
translate x * l
translate z * l
#declare l = l + 1;
}
#end
translate -4 * x
}
plane {
<0, 1, 0>, -1
pigment {
checker color Red, color Blue
}
}
=====================================================================
Thanks for any pointers
Post a reply to this message
|
![](/i/fill.gif) |