POV-Ray : Newsgroups : povray.general : Povray & CSV files : Re: Povray & CSV files Server Time
30 Jul 2024 08:16:30 EDT (-0400)
  Re: Povray & CSV files  
From: "Jérôme M. Berger"
Date: 22 May 2009 03:05:42
Message: <4a164ec6@news.povray.org>
Mike Williams wrote:
> Wasn't it gregjohn who wrote:
>> I want to make my own graph-plotting routine in povray using some CSV 

>> files that
>> are frequently generated at work.
>>
>> I know how to do this if I were to go to the trouble of editing the 
>> file and
>> inserting #declare's and {'s into the text.  I don't want to do this o
n a
>> regular basis, and might like to share the pov with folks who aren't a
s
>> pov-savvy right now.
>>
>> Any tips on how to get the data into povray from a typical standard CS
V?
> 
> The significant difference between standard CSV format and the file 
> format that can be read by POV with #read is that POV doesn't consider 
a 
> line break to be a field separator. So you need to add a comma at the 
> end of every line.
> 
> Another problem is that CSV files can contain commas within quoted 
> strings. I suspect that #fread may treat those as field separators. I 
> imagine that working round that might be quite messy if your data 
> contains commas. (I was going to check how #fread handles commas inside
 
> quoted strings, but my copy of POV seems to have suddenly died).
> 
	And finally, depending on your os language settings and the 
software you use to create the CSV, the format may change 
completely. For example in France, Excel creates CSV where the 
separator is the semicolon and the coma is used as a decimal point...

		Jerome
-- 
mailto:jeb### [at] freefr
http://jeberger.free.fr
Jabber: jeb### [at] jabberfr


Post a reply to this message


Attachments:
Download 'us-ascii' (1 KB)

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