Animating Mathematics with Manim

Here is a simple scene:

#!/usr/bin/env python

from manimlib.imports import *

class Fermat(Scene):
    def construct(self):
        example_tex = TexMobject(
            "x^n+y^n=z^n",
        )
        group = VGroup(example_tex)
        group.set_width(FRAME_WIDTH - 2 * LARGE_BUFF)

        self.play(Write(example_tex))
        self.wait()

To produce a gif, run:

python3 -m manim -ipfl blog.py Fermat

Here is the result: