"jr" <cre### [at] gmailcom> wrote:
> odd, yes. :-) I gather that the "script in C" is your own, so what I do not
> understand is, why not keep everything in RAM until all calculations are done,
> and do the "fprintf()"s after? (my own effort too is in C, make use of it if
> you wish
> regards, jr.
Thanks for sharing your script. It's quite sophisticated. Mine is messy :)
For two reasons, I directly use fprintf():
1. The mesh may get large, and surely I will have stack overflow. Thus, I have
to allocate the memory dynamically to keep all the data in memory. The memory
footprint is trivial for the modern machines, but I considered to be safer to
directly write them to the files.
2. When saving the data in raw forms (vectors), I can easily create other mesh
formats from the separate files. It is unlikely, as I only use POV-Ray, but it's
not a bad idea to keep the system flexible for future expansion.
Post a reply to this message