PyGraphArt
PyGraphArt copied to clipboard
Some Python code to make GIFs from graph algos
trafficstars
PyGraphArt
I wrote this code some time ago with the purpose of learning graph algorithms while enjoying it, through the creation of animated images that show how different graph algorithms work.
So through this code you can do something as follows.
Breadth-First Traversal

Depth-First Traversal

Prim's Algorithm

Kruskal's Algorithm

Dijkstra's Algorithm
Shortest paths from Milano:

Shortest paths from Roma:

Shortest paths from Napoli:

Note that some function may be bugged.
Thank @inconvergent for render.py that I somehow edited a bit.