POV-Ray : Newsgroups : povray.general : Reading coordinates into povray from an ascii file : Re: Reading coordinates into povray from an ascii file Server Time
29 Jul 2024 18:19:50 EDT (-0400)
  Re: Reading coordinates into povray from an ascii file  
From: bitman
Date: 13 Dec 2010 12:08:52
Message: <4d065324@news.povray.org>
On 12/13/2010 05:01 PM, bitman wrote:
> On 12/13/2010 04:55 AM, John wrote:
>> I've managed to #fopen and apparently #read the file successfully --
>> well, at
>> ...
>> Any syntactic hints?
>
>
>
> Hi John
>
> in one animation I write some variables into a file, to re read them
> with the next frame.
>
> Just write the declaration, you want to be read into the file, using the
> Povray SDL-syntax:
>
>
> //===< Write Values to File
> #fopen b1 "b1.inc" write
> #write(b1,"\n#declare ST_Centre =",ST_Centre ,";")
> #write(b1,"\n#declare ST_Normal =",ST_Normal ,";")
> #write(b1,"\n#declare b1_pos =",b1_pos ,";")
> #write(b1,"\n#declare b1_normal =",b1_normal ,";")
> #write(b1,"\n#declare b1_speed =",b1_speed ,";")
> #write(b1,"\n#declare bl_acceleration =",bl_acceleration,";")
> #write(b1,"\n#declare b1_gravity =",b1_gravity ,";")
> #write(b1,"\n#declare b1_resistence =",b1_resistence ,";")
> #fclose b1
>
>
> then you can just include this file in another run:
>
> #include "b1.inc"
>
> that's it :)
>
> BR
> bitman
>
>
>

hm, It seems I misread your post in a haste,
I would write a conversation script (perl, python etc) to convert your input format
in an format readable by Povray (#include).


Post a reply to this message

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