Fortran terminal spinning 3D-like donut
The earliest implementation I found in C was at this 2011 Gist. I fixed some bugs in this (array bounds). I also sped it up dramatically by writing line-by-line instead of character-by-character--this also reduces screen printing artifacts.
Works in Linux/macOS and Windows Terminal, using escape codes to position cursor and clear screen.
-frames 1000
: 1000 frames before exit
-dump file.txt
: dump each frame to a file
other Fortran donut