|
 |
clipka <ano### [at] anonymous org> wrote:
> Am 01.09.2016 um 21:54 schrieb Markus:
>
> > vertex_vectors {
> > vec
> >
> > #declare i = 0;
> > #declare j = 0;
> > #while(i<n)
>
> you want to move the "#declare j = 0" into the outer loop.
>
> > #while(j<m)
> > #declare x1 = pow(i*r,5) * cos(5 * j * phi) - i * r * cos(j * phi);
> > #declare y1 = pow(i * r,5) * sin(5 * j * phi) - i * r * sin(j * phi);
> > #declare z1 = i*r + j*phi;
> >
> > ,<x1,y1,z1>
> >
> > #declare j = j + 1;
> > #end
> > #declare i = i + 1;
> > #end
>
> Also, presuming you are using POV-Ray 3.7, to avoid such mistakes you
> can instead use the `#for` statement, which initializes and increments
> the variable automatically.
>
> #for(i,0,n-1)
> #for(j,0,m-1)
> ...
> #end
> #end
Thanks, this helped :-)
Post a reply to this message
|
 |