|
![](/i/fill.gif) |
Thank you both Thomas and Bill for your comments.
I came up with 2 versions that work. One defines an array for the points, and
the other seems to work just as well without it.
Here are the 2 versions.
1) No array
#fopen MyFile "Set_of_PointsXYZ.txt" read
#local i = 0;
#while (defined(MyFile))
#read (MyFile,Vector)
sphere { Vector, 0.1
texture {
pigment{ rgb <1,0,0>}
finish { Substance }}}
#local i = i + 1;
#end
2) Using an array
#declare Vector = array[100000];
#fopen MyFile "Set_of_PointsXYZ.txt" read
#local i = 0;
#while (defined(MyFile))
#local Vector [i] = <0,0,0>;
#read (MyFile,Vector[i])
sphere { Vector[i], 0.1
texture {
pigment{ rgb <1,0,0>}
finish { Substance }}}
Again, thanks so much for your assistance.
Post a reply to this message
|
![](/i/fill.gif) |