how the homepage video was made
After deciding to use a fullscreen video as the landing for my homepage I had several design goals for the video in mind:
- it should be created from scratch and representative of science I work on
- it should be simple with strong visuals so the viewer is not distracted by trying to understand what is going on
- things should be changing at a fast enough rate to be interesting but slow enough to be relaxing (to me this feels like a timescale of 5-10 seconds)
- though it doesn’t have to perfectly loop, it should be in some sort of steady state so that it can loop and not be jarringly obvious
- it should be at least 30 seconds long
I settled on running a simulation of driven turbulence using the Athena++ code. Running the simulation is as easy as installing Athena++ and fftw, compiling with python configure.py --problem=turb --eos=isothermal -fftw
, and then running the binary with input file athinput.turb.
I used the following parameters to get the kind of turbulence that would meet my design goals:
But most notably I set nlow = 2
and nhigh=512
to seed intermediate scale modes and turb_flag = 3
to drive the turbulence to a steady state. After putting the Athena++ outputs into the directory data/
, converting them to .png
was done with a simple python script:
I wanted to start with simulation already in steady-state and save on webpage loading times by making the video 20 fps, hence starting at file 800 only reading every third file (j = 800 + 3*i
). With the .png
frames in hand, I converted them to a video with an ffmpeg command: