Build Small Star Movement Videos Using Python

by matt392 in Circuits > Computers

58 Views, 0 Favorites, 0 Comments

Build Small Star Movement Videos Using Python

50-stars-still-image.png

Made several short video animations of the motion of stars near Earth. Used Claude.ai and Python.

Supplies

100-stars-still-image.png
  1. Python
  2. Python libraries; install using pip command:
  3. pip install numpy pandas pyvista "imageio[ffmpeg]"
  4. numpy
  5. pandas
  6. pyvista
  7. imageio + imageio-ffmpeg
  8. Numpy files with data below [pos0, vel.npy, valid_counts]
  9. Video player like VLC: https://www.videolan.org/

Generate Animation Files

10-stars-still-image.png
20-stars-still-image.png
  1. Download all 4 files from previous step:
  2. the 3 .npy.txt files
  3. the Python file
  4. Place all 4 files into one folder
  5. Change the 3 .npy.txt file endings to .npy
  6. These are the numpy files that the Python program will refer to when it runs.
  7. Use IDLE in Python to open the Python file [stellar_timelapse.py]
  8. Edit RENDER_SAMPLE variable to choose star count (5 to 100,000)
  9. Edit OUTPUT_MP4 variable to change the output file name
  10. Run the Python file
  11. A mp4 file should be in the same folder that you can run using a media player like VLC.