POV-Ray : Newsgroups : povray.general : Povray & CSV files : Re: Povray & CSV files Server Time
30 Jul 2024 08:15:19 EDT (-0400)
  Re: Povray & CSV files  
From: Christian Froeschlin
Date: 21 May 2009 18:26:53
Message: <4a15d52d$1@news.povray.org>
gregjohn wrote:
> Really? Suppose it's a list like this, how could you actually get these data
> "into" povray?
> 
> 1 , -2 , -8.4715E-05 , 57983.2925
> 2 , -1.98 , -8.5116E-05 , 56354.0494

#fopen CSV_FILE "file.csv" read

   // For each line you wish to read:
   #read(CSV_FILE, INDEX, V1, V2, V3)
   // Do something with the data


Instead of simple variables, you can also use arrays,
but then you need to create the array in advance. This
requires two passes if you don't know the number of
elements in advance.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.