|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I have been trying to read from a file containing rotation vectors for joints
involved in a move, however I could not get it working.
I set up a while loop to read all the records in the file, in the while
loop, POV-RAY reads the first record correctly, however in the second record it
complains about "Expecting a float, string, or a rotation vector, but finding a
instead."
I could not see anything different between 1st record it likes and the 2nd it
bumbs on, I even copied the 1st record twice to see if it will read it for the
seond time, it had not.
Again, here is my walk01.txt file:
"L_Hip_Ind",3,<-40,0,0>
"L_Knee_Ind",4,<0,0,0>
"L_Ankle_Ind",5,<50,0,0>
"R_Hip_Ind",13,<45, 0, 0>
"R_Knee_Ind",14,<5, 0, 0>
"L_Elbow_Ind",10,<2, 0, 0>
"R_Acromioclav_Ind",18,<0, 10, 0>
"L_Acromioclav_Ind",8,<0, -10, 0>
"R_Acromioclav_Ind",18,<-40, 0, 20>
"R_Elbow_Ind",20,<-90, 0, 0>
"R_Ball_Ind",17,<-60, 0, 0>
"Lower_Back_Ind",2,<-0,0,0>
"HumanoidRoot_Ind",0,<20, 0, 0>
Here is the loop that POV-RAY refuses to use to read beyond 1st record:
#fopen PosFile "walk01.txt" read
#while (defined( PosFile ))
#read (PosFile, Joint_Name, AVar_Ndx, Rot_Vector )
#declare AVAR[1][AVar_Ndx] = Rot_Vector * clock;
#debug concat( Joint_Name, ",", str(AVar_Ndx, 2, 0), ",",
vstr( 3, Rot_Vector, ", ", 3, 0), "\n" )
#end
#fclose PosFile
Any insight would be greatly appreciated, I attempted embedding blank spaces
among the three elements I am trying to read off of the file. No matter what
combinations I had tried, I could not succeed. I looked at the file with a hex
code encoder to make sure no funny invisible character was hiding. Nope it was
not. Carriage Return character was at the end of each line right after ">"
closing bracet of the Rot_Vector.
Thanks,
Meltem
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it melo who wrote:
>I have been trying to read from a file containing rotation vectors for joints
>involved in a move, however I could not get it working.
>
>I set up a while loop to read all the records in the file, in the while
>loop, POV-RAY reads the first record correctly, however in the second record it
>complains about "Expecting a float, string, or a rotation vector, but finding a
>instead."
>
>I could not see anything different between 1st record it likes and the 2nd it
>bumbs on, I even copied the 1st record twice to see if it will read it for the
>seond time, it had not.
>
>Again, here is my walk01.txt file:
>
>"L_Hip_Ind",3,<-40,0,0>
>"L_Knee_Ind",4,<0,0,0>
>"L_Ankle_Ind",5,<50,0,0>
>"R_Hip_Ind",13,<45, 0, 0>
>"R_Knee_Ind",14,<5, 0, 0>
>"L_Elbow_Ind",10,<2, 0, 0>
>"R_Acromioclav_Ind",18,<0, 10, 0>
>"L_Acromioclav_Ind",8,<0, -10, 0>
>"R_Acromioclav_Ind",18,<-40, 0, 20>
>"R_Elbow_Ind",20,<-90, 0, 0>
>"R_Ball_Ind",17,<-60, 0, 0>
>"Lower_Back_Ind",2,<-0,0,0>
>"HumanoidRoot_Ind",0,<20, 0, 0>
POVRay doesn't see line breaks as being field separators. You need to
have commas at the end of each line except the last.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Williams nous apporta ses lumieres en ce 2008/02/16 00:32:
> Wasn't it melo who wrote:
>> I have been trying to read from a file containing rotation vectors for
>> joints
>> involved in a move, however I could not get it working.
>>
>> I set up a while loop to read all the records in the file, in the while
>> loop, POV-RAY reads the first record correctly, however in the second
>> record it
>> complains about "Expecting a float, string, or a rotation vector, but
>> finding a
>> instead."
>>
>> I could not see anything different between 1st record it likes and the
>> 2nd it
>> bumbs on, I even copied the 1st record twice to see if it will read it
>> for the
>> seond time, it had not.
>>
>> Again, here is my walk01.txt file:
>>
>> "L_Hip_Ind",3,<-40,0,0>
>> "L_Knee_Ind",4,<0,0,0>
>> "L_Ankle_Ind",5,<50,0,0>
>> "R_Hip_Ind",13,<45, 0, 0>
>> "R_Knee_Ind",14,<5, 0, 0>
>> "L_Elbow_Ind",10,<2, 0, 0>
>> "R_Acromioclav_Ind",18,<0, 10, 0>
>> "L_Acromioclav_Ind",8,<0, -10, 0>
>> "R_Acromioclav_Ind",18,<-40, 0, 20>
>> "R_Elbow_Ind",20,<-90, 0, 0>
>> "R_Ball_Ind",17,<-60, 0, 0>
>> "Lower_Back_Ind",2,<-0,0,0>
>> "HumanoidRoot_Ind",0,<20, 0, 0>
>
> POVRay doesn't see line breaks as being field separators. You need to
> have commas at the end of each line except the last.
>
You can even have an extra, and useless, coma after the last item.
--
Alain
-------------------------------------------------
The tree of liberty must be refreshed from time to time with the blood of
patriots and tyrants.
Thomas Jefferson
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Alain <ele### [at] netscapenet> wrote:
Thank you gentlemen, adding commas surely did the trick. It was one of those
things that had never occurred to me, neither had I noticed it mentioned in the
online documentation.
> Mike Williams nous apporta ses lumieres en ce 2008/02/16 00:32:
> > Wasn't it melo who wrote:
> >> I have been trying to read from a file containing rotation vectors for
> >> joints
> >> involved in a move, however I could not get it working.
> >>
> >> I set up a while loop to read all the records in the file, in the while
> >> loop, POV-RAY reads the first record correctly, however in the second
> >> record it
> >> complains about "Expecting a float, string, or a rotation vector, but
> >> finding a
> >> instead."
> >>
> >> I could not see anything different between 1st record it likes and the
> >> 2nd it
> >> bumbs on, I even copied the 1st record twice to see if it will read it
> >> for the
> >> seond time, it had not.
> >>
> >> Again, here is my walk01.txt file:
> >>
> >> "L_Hip_Ind",3,<-40,0,0>
> >> "L_Knee_Ind",4,<0,0,0>
> >> "L_Ankle_Ind",5,<50,0,0>
> >> "R_Hip_Ind",13,<45, 0, 0>
> >> "R_Knee_Ind",14,<5, 0, 0>
> >> "L_Elbow_Ind",10,<2, 0, 0>
> >> "R_Acromioclav_Ind",18,<0, 10, 0>
> >> "L_Acromioclav_Ind",8,<0, -10, 0>
> >> "R_Acromioclav_Ind",18,<-40, 0, 20>
> >> "R_Elbow_Ind",20,<-90, 0, 0>
> >> "R_Ball_Ind",17,<-60, 0, 0>
> >> "Lower_Back_Ind",2,<-0,0,0>
> >> "HumanoidRoot_Ind",0,<20, 0, 0>
> >
> > POVRay doesn't see line breaks as being field separators. You need to
> > have commas at the end of each line except the last.
> >
> You can even have an extra, and useless, coma after the last item.
>
> --
> Alain
> -------------------------------------------------
> The tree of liberty must be refreshed from time to time with the blood of
> patriots and tyrants.
> Thomas Jefferson
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|