Message Boards Message Boards

2
|
9143 Views
|
2 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Importing File Sequence in Mathematica

Posted 11 years ago
Hello World;

I have been trying to make an animation for my research. I have a bunch of prototype output files so called
output1.txt        
output2.txt
output3.txt
output4.txt
...etc

When I feed those files one at a time, I get stay images. What I would like to do is feed all the files
in order in every 0.5 seconds, so I will have 2 frames per second but I cannot figure out how to
update the file sequences in mathematica.This is what I have so far and I am looking for the coding
to update the files automatically.
Graphics3D[<< output1.txt]
Graphics3D[<< output2.txt]
Graphics3D[<< output3.txt]
Graphics3D[<< output4.txt]
If you have any ideas, please let me know. Thank You.

-P. Aung
POSTED BY: P Aung
2 Replies
Posted 11 years ago
I just listed all the input files using
ListAnimate[{input.txt,input1.txt,.....}]
Thank you very much Karl.
P. Aung
POSTED BY: P Aung
I think that the simplest approach to a problem like this would be to bring all the images into Mathematica at once, then animate them using ListAnimate:

http://reference.wolfram.com/mathematica/ref/ListAnimate.html


ListAnimate has an AnimationRate option which lets you control the frame rate.

If you really must bring in the files one at a time like that, you could probably make it work using RunScheduledTask:

http://reference.wolfram.com/mathematica/ref/RunScheduledTask.html
POSTED BY: Karl Isensee
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract