Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions example_scenes/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,24 @@ def construct(self):


# See many more examples at https://docs.manim.community/en/stable/examples.html


class QuadraticFormula(Scene):
"""Demonstrates the quadratic formula with a clear mathematical presentation."""

def construct(self):
# Title
title = Text("The Quadratic Formula", font_size=48)
title.to_edge(UP)
self.play(Write(title))
self.wait()

# The famous formula
formula = MathTex(r"x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}")
formula.scale(2)
self.play(Write(formula))
self.wait(2)

# Cleanup
self.play(FadeOut(title, formula))
self.wait()