|
|
Okay, so I have what is probably another very simple question.
I have created a very simple text file, which contains the line:
<0,5,0>
and then us the following code to draw a sphere at the position given by teh
vector in the file:
#include "colors.inc"
light_source { <100,1000,-1000>, White}
camera { location <0,0,-20> look_at <0,0,0>}
#fopen FileHandle "coords.txt" read
#read (FileHandle,coordVector)
#fclose FileHandle
sphere{<coordVector.x,coordVector.y,coordVector.z>,1 pigment{color Red}}
This all works nicely. However, is there a way to read in an arbitrary number of
lines from the text file, like:
<0,5,0>
<0,0,0>
....
....
<xn,yn,zn>
and draw the corresponding spheres, without using any loops... i.e. is it
possible for POV-Ray to import and work with a single matrix, where the first
column is all the x coordinates, etc.
Many thanks,
Tom
Post a reply to this message
|
|