Can Fortran be used to create a video of changing arrays?

In summary, the discussion was about creating a video of arrays changing from beginning to end. One person suggested using VMD, but the other person mentioned having trouble with dat/text files. The size of the arrays varies from 10x10 to 100x100 and there was a question about snapshotting the screen manually. It was suggested to use a for loop and clear the screen before each snapshot using an ANSI screen code.
  • #1
Lukejambo
13
0
Hi, using Fortran that writes a large amount of arrays to a text/dat file.

Is there some kind of software where I can create a video of these arrays changing from beginning to end?

I've tried using VMD, but cannot get dat/text files working on it.

Any input will be appreciated.
 
Technology news on Phys.org
  • #2
What is the size of the arrays?

It seems you could write them the terminal screen and blank the screen between snapshots to show them changing in place.
 
  • #3
I need to change the size of the arrays each time I run the programme but they vary from 10x10 to 100x100.

Will I need to snapshot the screen manually? I can have over 100 arrays written to the file and it'll take a while to screen shot each one manually.
 
  • #4
You could just record the video output depending on the graphics card you have.
 
  • #5
Okay thanks and I'd need to do this in the terminal, is there a way of recording each array snapshot from a dat/text file?
 
  • #6
I would use a for loop to control calculation and then display and then sleep for a second or less and then repeat.

Prior to each snapshot display I'd clear the screen using an ANSI screen code printed to the screen.
 

1. What is Fortran?

Fortran (short for Formula Translation) is a high-level programming language used primarily for scientific and engineering computations. It was first developed in the 1950s and has evolved over the years to become a powerful and efficient language for numerical calculations.

2. How can I create a video using Fortran?

Creating a video using Fortran involves using a combination of Fortran code and external libraries such as FFmpeg or GStreamer. The Fortran code is used to generate the video frames, while the libraries handle the encoding and decoding of the frames to create a video file.

3. Can I add animations and effects to my Fortran video?

Yes, you can add animations and effects to your Fortran video by using libraries such as OpenGL or DirectX. These libraries allow you to create 3D graphics and apply various effects to your video, making it more visually appealing.

4. Is Fortran a good choice for creating videos?

Fortran is a good choice for creating videos if you are familiar with the language and need to perform complex numerical calculations as part of the video creation process. However, if your primary goal is to create visually stunning videos, other languages like Python or C++ may be better options.

5. Are there any resources available to help me learn Fortran for video creation?

Yes, there are many resources available to help you learn Fortran for video creation. Some popular resources include online tutorials, books, and forums where you can interact with other Fortran users and ask for help. Additionally, many universities offer courses in Fortran programming that cover video creation as well.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
11
Views
2K
  • Programming and Computer Science
Replies
18
Views
1K
  • Programming and Computer Science
Replies
5
Views
8K
Replies
3
Views
770
  • Programming and Computer Science
Replies
12
Views
1K
  • Programming and Computer Science
Replies
12
Views
2K
  • Programming and Computer Science
Replies
16
Views
2K
  • Programming and Computer Science
Replies
13
Views
2K
Back
Top