![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Attached are two files. Run readlist.pov first and it generates a text
file with the contents of an array of vectors. When I run writelist.pov
I get a plethora of errors, mainly, on line 94:
Attempted to redefine vector identifier as float identifier.
I don't get it. I've read the docs and as far as I can see I'm doing
everything right, if not in a round about way.
Can anyone figure out what's going wrong?
Thanks,
Josh
Post a reply to this message
Attachments:
Download 'us-ascii' (3 KB)
Download 'us-ascii' (2 KB)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Josh English wrote:
>
> Attached are two files. Run readlist.pov first and it generates a text
> file with the contents of an array of vectors. When I run writelist.pov
> I get a plethora of errors, mainly, on line 94:
> Attempted to redefine vector identifier as float identifier.
>
> I don't get it. I've read the docs and as far as I can see I'm doing
> everything right, if not in a round about way.
>
> Can anyone figure out what's going wrong?
>
> Thanks,
>
> Josh
>
> #while ( cnt < dimension_size(tlist,1) )
> #declare MuVect = <0,0,0>;
> #read (MyFile,MyVect)
> #declare tlist[cnt] = MyVect;
I don't know if that's the problem, but shouldn't the
#declare be for MyVect instead of MuVect?
Jerome
--
* Doctor Jekyll had something * mailto:ber### [at] iname com
* to Hyde... * http://www.enst.fr/~jberger
*******************************
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
hmmm.... probably. That is a sad typo that I am justly famous for. But even
without that line it fails. In the first loop of ReadList.pov I have
commented out the #read (MyFile,tlist[cnt]) because it gave me similar
errors. It seems that POV is reading the file and reading the first portion
of the vector as a float variable, then ignoring the rest of that line.
Josh
Jerome wrote:
> Josh English wrote:
> >
> > Attached are two files. Run readlist.pov first and it generates a text
> > file with the contents of an array of vectors. When I run writelist.pov
> > I get a plethora of errors, mainly, on line 94:
> > Attempted to redefine vector identifier as float identifier.
> >
> > I don't get it. I've read the docs and as far as I can see I'm doing
> > everything right, if not in a round about way.
> >
> > Can anyone figure out what's going wrong?
> >
> > Thanks,
> >
> > Josh
> >
> > #while ( cnt < dimension_size(tlist,1) )
> > #declare MuVect = <0,0,0>;
> > #read (MyFile,MyVect)
> > #declare tlist[cnt] = MyVect;
> I don't know if that's the problem, but shouldn't the
> #declare be for MyVect instead of MuVect?
>
> Jerome
> --
> * Doctor Jekyll had something * mailto:ber### [at] iname com
> * to Hyde... * http://www.enst.fr/~jberger
> *******************************
--
Josh English
eng### [at] spiritone com
"May your hopes, dreams, and plans not be destroyed by a few zeros."
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Did some experimenting and found a solution. Write the values to
the file separated by commas instead of line feeds. Then the other
script reading the file works just fine. See notes below.
rc
"Josh English" <eng### [at] spiritone com> wrote in message
news:393C708B.F272111A@spiritone.com...
> Attached are two files. Run readlist.pov first and it generates a text
> file with the contents of an array of vectors. When I run writelist.pov
> I get a plethora of errors, mainly, on line 94:
> Attempted to redefine vector identifier as float identifier.
>
> I don't get it. I've read the docs and as far as I can see I'm doing
> everything right, if not in a round about way.
>
> Can anyone figure out what's going wrong?
>
> Thanks,
>
> Josh
>
Note that the "\n" has been replaced by "," in the write statements:
> #declare plist = array [5]
> { <-1,0,0> <-0.5,0,0> <0,0,0> <0.5,0,0> <1,0,0> }
>
>
> #fopen MyFile "pointlist.txt" write
>
> #write (MyFile,dimension_size(plist,1),",")
>
> #declare cnt = 0;
> #while ( cnt < dimension_size(plist,1) )
> #write (MyFile,plist[cnt],",")
> #declare cnt = cnt + 1;
> #end
>
> #fclose MyFile
>
> PlotList(plist)
That leaves a trailing comma in the text file. Based on the example
given that should not cause a problem.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |