|
|
"Eric" <[firstname]@theothersideofthenet.com> wrote:
> Although far from new to POV-Ray (programmed first rendering in about 1996),
> I am an infrequent user and thus a novice. Right now I'm returning to it to
> produce some 3D statistical graphs. It would be really convenient for me
> read data in from some sort of two-dimensional data file (a table). Comma
> separated value files (.CSV) are commonly used for this. Is there any
> convenient way to read a CSV file into some sort of data container (an
> array of arrays? or can MATRIX be used other than for transforms?)
>
> Thanks!
> -Eric
Reading the data in one value at a time is unnecessary.
If you can format the text to read like a proper array declaration, then you
can simply #include that file:
// data file, saved as "Myarray.inc"
#declare Myarray = array[5][5]
{
(1, 2, 3, 4, 5},
{5, 4, 3, 2, 1},
{6, 7, 8, 9, 0},
{7, 4, 6, 3, 4},
{9, 4, 2, 5, 7}
}
// -----------------------------
// Main POV file
#include "Myarray.inc"
Post a reply to this message
|
|