Browse documentation

Animating a geometric proof

Build a Pythagorean-theorem-style proof using shapes, labels, and keyframes.

Let's build something with a bit more weight to it: a right triangle that grows into place, followed by its Pythagorean identity appearing underneath — a2+b2=c2a^2 + b^2 = c^2. Along the way you'll meet all three of Manim Studio's keyframing workflows: the Animate a value panel at the top of the Anim tab, record mode, and the manual ◆ diamonds. By the end you'll know which one to reach for in a given situation.

1. Place the triangle

From the Object Library's Shapes section, click Triangle to drop one at the origin. Open the Shape tab in the Inspector — a triangle exposes right-triangle presets and angle controls here if you want a cleaner 3-4-5-style shape, but the default is fine for this walkthrough.

2. Place the formula

Click MathTex (in Text & Math) to add a formula object below the triangle. Double-click it — either on the canvas or via its editor — and enter:

a^2 + b^2 = c^2

Use the Move tab to drag or nudge it so it sits just under the triangle. This is the payoff line of the proof, so it's worth taking a moment to position it where it reads clearly once both objects are on screen together.

3. Animate the triangle with record mode

Now let's make the triangle grow into place over the first second, using record mode — the easiest way to keyframe something you're already doing by hand.

  1. Select the triangle.
  2. In the timeline's transport bar, click the record button (●). It turns solid/pulsing to show it's active.
  3. Move the playhead forward — drag it to around the 1-second mark.
  4. With the triangle still selected, change something: scale it down slightly in the Move tab (or drag its handle on the canvas) so it looks like it's grown from a smaller starting size once you play it back.
  5. Click ● again to turn recording off.

What just happened: because record mode was on, that value change didn't just edit the triangle — it created a property animation running from the triangle's previous state (at the scene start, since there was no earlier keyframe) up to the playhead, at 1 second. Scrub the playhead back to 0 and you'll see the triangle at its smaller starting scale; scrub to 1s and it's at full size.

Record mode is the right tool whenever you want to say "just animate what I'm already doing" — turn it on, move the playhead, change values or drag the object, turn it off. No need to think about from/to values at all.

4. Animate the formula's entrance with the ◆ diamond flow

For the formula, let's do something more precise: keyframe its opacity from invisible to visible, timed to start exactly when the triangle finishes growing. This is a good moment to use the ◆ diamond flow instead of record mode, since we want exact before/after values without dragging anything on the canvas.

  1. Select the formula object.
  2. Move the playhead to 1 second (right where the triangle's growth ends).
  3. In the Style tab, set Opacity to 0. Next to the opacity field is a small ◆ diamond — click it. It lights up (armed), and a toast confirms the start point was stamped: opacity = 0 at 1s.
  4. Move the playhead forward to, say, 2 seconds.
  5. Set opacity back to 1.
  6. Click the ◆ diamond again. The two stamped points — 0 at 1s, 1 at 2s — become a single property animation ramping opacity from 0 to 1 over that second.

Clicking the armed diamond again without moving the playhead cancels it, and Escape also clears an armed diamond if you change your mind partway through.

Worth knowing: opacity going from 0 to 1 is exactly the kind of single-number change the Animate a value panel at the top of the Anim tab does in one click — pick Opacity under "What", type 1 as the "To" value and 1 second as the duration, and the finished animation lands on the timeline. We're doing it by hand here so you can see what the diamonds are actually stamping.

Reach for the Animate a value panel when all you want is one number to go from A to B — opacity, rotation, radius, width, height or stroke width — and you'd rather type the target and the duration than stamp anything. Reach for record (●) when you're already changing the object the way you want and just want it captured. Reach for the ◆ diamonds when you know the exact from/to values up front and don't need to physically drag or scrub to produce them — and for the things the panel doesn't cover, like position, scale, colour, or a formula's own animated fields.

5. Play it back

Press Space. You should see the triangle grow into place over the first second, then the formula a2+b2=c2a^2 + b^2 = c^2 fade in underneath it a second later — a small, satisfying two-beat proof animation.

What's next

This is a hand-assembled version of something Manim Studio can also do as a guided, step-by-step algebraic derivation — see Build a derivation for that workflow using the derivation object and TransformMatchingTex. If you'd rather draw your own shapes from scratch instead of using the built-in library, the next tutorial covers the separate Canvas studio workspace: Draw and animate in the Canvas studio.