Perfect Graphs Video

GitHub

The final project for my Graph Theory course was to create a video explaining a graph theory concept. My partner and I chose to explain perfect graphs.

Having grown up watching math videos from channels like 3Blue1Brown, Vi Hart, and Numberphile, I wanted to create a video that was engaging and visually appealing. I discovered that 3Blue1Brown had a public animation library called manim and that there was a community edition with documentation for animating graphs.

With this tool, I was able to create scenes using Python code like the following, which creates the final scene of the video:

class Threshold(Scene):
    def construct(self):
        G = Graph([], [])
        self.add(G)
        self.play(G.animate.add_vertices(1, labels=True, positions={1: [-2, -2, 0]}))
        self.wait(3)
        self.play(G.animate.add_vertices(2, labels=True, positions={2: [0, -2, 0]}))
        self.wait(3)
        self.play(G.animate.add_vertices(3, labels=True, positions={3: [0, 0, 0]}))
        self.play(G.animate.add_edges(*[(3, v) for v in range(1, 3)]))
        self.wait(5)
        ...

This, along with a few helper functions for procedurally creating common types of graphs, made it easy to create clean animations that conveyed the concepts we wanted to explain.

Perfect Graphs Video Storyboard

After collecting and organizing a set of concepts and fun facts surrounding perfect graphs, we determined the structure of the video with a storyboard.

We were then able to create the following video. Please note that some background in graph theory is assumed, as our intended audience was our classmates.

Back to Projects