POV-Ray : Newsgroups : povray.advanced-users : Fishtail math ><}}}*> : Re: Fishtail math ><}}}*> Server Time
30 Jul 2024 14:20:52 EDT (-0400)
  Re: Fishtail math ><}}}*>  
From: Peter Popov
Date: 20 Nov 1999 15:05:09
Message: <u=w2OEGxFsONYadZI3BIQp3IwMJt@4ax.com>
On 20 Nov 1999 04:13:41 -0500, ing### [at] homenl (ingo) wrote:

>Peter Popov wrote:
>
>>I got your intentions wrong. This should do what you want, as
>>described in your original post.
>>
>>#declare Pos=array[11]
>>
>>#declare i=0;
>>#while (i<11) #declare Pos[i]=<i,0,0>; #declare i=i+1; #end
>>
>>#declare i=0;
>>#while (i<10)
>>  #declare j=i+1;
>>  #while (j<11)
>>    #declare Pos[i]=
>>    vrotate((Pos[j]-Pos[i]),<0,0,10*clock>)+Pos[i];
>>    #declare j=j+1;
>>  #end
>>  #declare i=i+1;
>>#end
>
>Sorry but no, ten spheres end up at <10,0.9,0> and one at <10,0,0>.
>
>Ingo

Sorry, that was a typo. it should read

#declare Pos=array[11]

#declare i=0; #while (i<11) #declare Pos[i]=<i,0,0>; #declare i=i+1;
#end

#declare i=0;
#while (i<10)
  #declare j=i+1;
  #while (j<11)
    #declare Pos[j]=  // here was the typo
    vrotate((Pos[j]-Pos[i]),<0,0,10*sin(2*pi*clock)>)+Pos[i];
    //the previous line was modified to make a cyclic anim
    #declare j=j+1;
  #end
  #declare i=i+1;
#end

I actually tested it this time :), and it worked.


Peter Popov
ICQ: 15002700


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.