PS:Random tree 6

TinyPS Editor

This is an animated version of the tree producing a sequence of 50 PNG files. We cannot create another tree for each frame, so the randomness must be handled. The rand2 function builds a series of 1000 random numbers which are sequentially reused. The recursion must also have a fixed length now, because otherwise the rand2 operator would be mixed in its offsets. Each frame must consume the same number of random numbers.

The zipped PNG files can be converted to a MP4 movie using FFMPEG.

ffmpeg2 -y -r 12 -i $filename/1%03d.png -c:v libx264 -preset slow -tune animation -g 50 -pix_fmt yuv420p -profile:v baseline -crf 16 -movflags +faststart $filename.mp4

Gallery