Regarding actual input and output, I assume that’s relatively easy with ffmpeg.
As for results, the challenge might be keeping the illusion of movement from frame to frame.
It’s likely small changes to the input image result in largely different positioning of the shapes. When watched as a movie, this wouldn’t result in a fluid motion.