Python Visualization Questions

Help

Day 20 motivated me to try to come up with a visualization of my solution but I'm scratching my head trying to coming up with the best way to pull this off. How do you all make these awesome animations?

I'm writing in python so I thought I'd try to reuse some code from 2018. Back then I used pygame and dumped out a pile of sequentially named images and ran them through ffmpeg to generate a video. Is there a better way? The number of frames in my day 20 solution is really quite high.

Posted Dec 21, 2020, 1:36 AM UTC

32
Fyvaproldje•

My output for this year is to HTML canvas, and I use simplescreenrecorder in Linux to select the part of the webpage. Maybe not the best solution, but it works more or less. But I make it available online for other people to try it on their input, so I don't even have the ffmpeg choice there. Perhaps there is some better way to record output of canvas, or perhaps of SDL window.

Previous year I was writing directly to .gif, but that created lots of limitations. Series of images which are later passed through ffmpeg would be better than that.

I know some people output terminal control codes for colors etc, and record output of the terminal.

2
_O-o-f•

Though I haven't made any visualizations, I know of 3 primary visualization(ish) libraries: turtle, tkinter, and pygame. Turtle is for when you're trying to traverse a plane, while tkinter is more for tile based visualizations and pygame for the rest imo.

You could also look into some gif making libraries and try to do thing from there.

Colored terminal outputs with colorama also can work.

1