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 on a
>regular basis, and might like to share the pov with folks who aren't as
>pov-savvy right now.
>
>Any tips on how to get the data into povray from a typical standard CSV?
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).
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|