POV-Ray : Newsgroups : povray.general : #read fiasco : Re: #read fiasco Server Time
11 Aug 2024 09:21:32 EDT (-0400)
  Re: #read fiasco  
From: Greg M  Johnson
Date: 9 Aug 1999 08:48:33
Message: <37AECD93.333A1FDB@geocities.com>
So, like how would you make your inc if you had two variables which were
[350][34] each?

Would your file generator literally say:

#declare position.x[1][1]=1;
#declare position.y[1][1]=2;
#declare position.z[1][1]=3;
#declare position.x[1][2]=4;
#declare position.y[1][2]=5;
#declare position.z[1][2]=6;

I know how to write such a file, but wouldn't this make it a huge INC?  Are
you sure this is faster than reading with a #while loop the following data:

 1,2,3,4,5,6,


John VanSickle wrote:

> Greg M. Johnson wrote:
> >
> > I wish that the documentation better explained the syntax for #read
> > and #write.
> >
> > I have created a file of the positions and velocities of a number of
> > particles, (34 particles at 350 time periods).  I have pasted the
> > first four records from my file.
>
> Generally, when I have an outside program generate data for POV-Ray,
> I have the same program output a standard .INC file, with all of the
> #declares, #locals, etc., needed for POV-Ray to parse the file directly.
> This requires very little extra effort in the program that generates the
> data, and the results parse a lot faster.
>
> For instance, in my last IRTC entry, the insect parts were made of
> bicubic patches, which I converted to meshes using a bit of macro
> code.  I got tired of waiting for the macro to parse, so I modified the
> macro to write the triangles to a file, in full POV syntax.  From then
> on I merely #included the generated files, in place of the original
> generating code.  Things parsed much more quickly.
>
> Regards,
> John


Post a reply to this message

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