diff --git a/example_scenes/basic.py b/example_scenes/basic.py index 6e8c866f49..d0c06ec288 100644 --- a/example_scenes/basic.py +++ b/example_scenes/basic.py @@ -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()