|
![](/i/fill.gif) |
"Andrej" <and### [at] emailwithoutspam si> wrote in message
news:4381d16b@news.povray.org...
>I have a offset problem with object balls. With box, it's ok. If I change
>the Wi and Hi, the box will remain in center but the balls wouldn't.
> ... snip ... #declare Hi=4;
> ... snip ...
> #declare OffsetY=-Hi/2; // Ouch...
> ... snip ...
> #while (CountY < Hi)
> ... snip ...
> object {balls translate <OffsetX, OffsetY, 0>}
>
Hi,
Your 'while' loop continues while CountY is less than Hi. ie. from CountY =
0 to CountY = 3, so you draw a sphere from 0 to 3, then you offset the array
of spheres by -2, so it won't be centred.
You probably want to use: #while (CountY <= Hi)
Regards,
Chris B.
Post a reply to this message
|
![](/i/fill.gif) |