This C program produces videos for various sorting algorithms. Points are ordered by hue, and the distance from the center indicates a point's distance from its correct position. The original idea for this animation comes from w0rthy.
To create a video, pipe standard output into a video encoder:
$ ./sort | x264 --fps 60 -o video.mp4 /dev/stdin
Some media players can play raw video from standard input as well:
$ ./sort | mpv --no-correct-pts --fps=60 -
Others need help from mjpegtools (
$ ./sort | ppmtoy4m -F60:1 | vlc -