|
|
~
does Povray support for loops , if so, then how?
I want to create a row of 10 spheres along the x-axis.
Instead of copying the sphere code 10 times, I tried to use a for loop, but
nothing doing.
#include "colors.inc"
camera {
location <0, 0, -10>
look_at <0, 0, 0>
}
for (int x = 0, x < 10; x++)
{
sphere {
<x, 0, 0>, .5 // I wanted to draw 10 spheres,
with x starting at 0, going to 10
texture {
pigment { color Red }
}
}
}
light_source { <0, 0, -5> color White}
Is it possible to use a for loop, or is the easiest way to use the brute
force method?
thanks....
out
Post a reply to this message
|
|