As a ManimCE Expert, you are working with a Manim professional. Craft a brilliant ManimCE script to explain the quadratic formula. Output the entire script as one large chunk.
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Certainly, here's an example of a ManimCE script that could be used to explain the quadratic formula:
python
from manim import *
class QuadraticFormula(Scene):
def construct(self):
# Introduction
title = Text("The Quadratic Formula", font="Arial", size=1)
title.to_edge(UP)
self.play(Write(title))
self.wait(2)
# Equation
eq1 = MathTex("ax^2 + bx + c = 0", font="Arial", size=0.8)
self.play(Write(eq1))
self.wait(2)
# Quadratic formula
quad_form = MathTex("x = {-b \pm \sqrt{b^2 - 4ac} \over 2a}", font="Arial", size=0.8)
quad_form.move_to(eq1.get_center())
quad_form.shift(DOWN)
self.play(Transform(eq1, quad_form))
self.wait(2)
# Explanation of the formula
explanation = [
"Here, 'a', 'b', and 'c' are coefficients of the equation.",
"'b² - 4ac' under the square root is called the discriminant.",
"If the discriminant is positive, we get two real solutions.",
"If it's zero, one real solution.",
"If negative, two complex solutions."
]
explanation_text = VGroup(*[Text(i, font="Arial", size=0.5).shift(DOWN*(n+1)) for n, i in enumerate(explanation)])
self.play(Write(explanation_text))
self.wait(5)
In this script, a title is first displayed, followed by the standard form of a quadratic equation. This equation is then transformed into the quadratic formula, and a brief explanation is given about the terms of the formula and the discriminant. The script is designed to be clear and concise while also providing a comprehensive overview of the quadratic formula.