POV-Ray : Newsgroups : povray.general : Is Basic language array to POV array possible? : Re: Is Basic language array to POV array possible? Server Time
9 Aug 2024 01:24:24 EDT (-0400)
  Re: Is Basic language array to POV array possible?  
From: Bob Hughes
Date: 9 Sep 2000 13:09:52
Message: <39ba6ee0@news.povray.org>
"Dave Blandston" <gra### [at] earthlinknet> wrote in message
news:39ba693e@news.povray.org...
| "Bob Hughes" <per### [at] aolcom?subject=PoV-News:> wrote in message
| news:39ba648f@news.povray.org...
| > I was trying to convert some Basic programming language arrays to POV
| arrays
| > and it hasn't worked.  Does anyone have experience with doing this yet?
|
| Without seeing your code, here's one suggestion: POV arrays go from [0 ..
| n-1] when n is the number you use to declare the array, so if you want an
| array of 15 elements the valid indexes are 0 through 14. If this doesn't
| help I will be glad to look at your code, because I first programmed my
| stone wall macro in Basic then converted it to POV, and it uses arrays.

Oh, thanks Dave, well yeah I did make sure it started at zero anyway.
Beyond that I'm lost.  This is the pertinent portion:

#declare I=0;
#while (IT<=NRS)
#declare T=(IT-1)*360/NRS;
#declare T1=3.141590*(T-TH)/180;
#declare X[I]=R*cos(T/5.729579)+150;
#declare Y[I]=R*sin(T/5.729579)+100;
#declare Z[I]=0;
#declare VX[I]=-V*sin(T1);
#declare VY[I]=V*cos(T1);
#declare VZ[I]=0;
#declare I=int(I+1);
#end // IT

Just seems to me that the array doesn't want a variable, or rather that I
don't understand the differences at all.  The Basic way is to store each
instance as you probably know.  I never have used the POV array before and
it acts as though it can't store a number in this way.
Glad you know this sort of thing.  You might want to see the whole file, I'm
still trying to figure how to best apply it in POV.

Bob


Post a reply to this message

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