Chaotic Scattering with POV-Ray
This project was created somewhere around 2000 to reproduce the Chaotic Scattering experiment with the help of POV-Ray raytracer.
The .pov file constructs a scene with 4 reflecting spheres and 4 light emitting planes arranged in pyramid, where each sphere touches each other. When ray cast from camera enters the space between the spheres it can scatter infinitely or exit in any direction. This creates fractal like structure.
The .ini file sets some parameters that provide tradeoff between performance and quality. POV-Ray produces .png files that can be combined with the help of avconv to create animation.
I use the following command in avconv:
avconv -framerate 60 -f image2 -i img/img%04d.png -c:v h264 -crf 1 -pix_fmt yuv444p movie.mp4
or following command in ffmpeg that is optimized for YouTube:
ffmpeg -framerate 48 -f image2 -i img/img%04d.png -c:v libx264 -preset slower -profile:v high -crf 18 -coder 1 -pix_fmt yuv420p -movflags +faststart -g 96 -bf 2 -metadata title="Chaotic Scattering" chaotic-scattering.mp4
You can try to change the antialias settings for better quality: Antialias_Depth=9 Antialias_Threshold=0.001