POV-Ray : Newsgroups : povray.general : about #fopen Server Time
25 Dec 2024 01:27:08 EST (-0500)
  about #fopen (Message 1 to 1 of 1)  
From: ferrari
Subject: about #fopen
Date: 14 Jun 2006 16:05:00
Message: <web.44906bb2af9b1fad2e10ed0e0@news.povray.org>
hello, I am using #fopen and (#read) to read data from a list of this form:

1;
0.4;
4;
2.34;
5.67;
2.11;
ect...

I need to assign each value for the next frame in an animation.

I use this code:

#declare Dur=3000;
#fopen Muestreo1 "muestreoc5-pd1.txt" read
#declare Fm1=0;
#declare Frames1=0;
Declare_From(Fm1,0)
#while(Frames1<(Dur))
#read (Muestreo1,S1)
Declare_To(Fm1,(Frames1)/Dur,S1)
#declare Frames1=Frames1+1;
#end

where:
Dur is the dur in frames of the anim.
Fm1 is the name of value
S1 is the value of the "next value" in the list of textfile.
this works fine but I don`t sure if this is the most efficient...
there is some other way to do it??????

thanks a lot!!!


Post a reply to this message

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