Add QuadraticFormula example to basic.py
Add QuadraticFormula example to basic.py
- Adds educational example demonstrating quadratic formula visualization
- Shows clear mathematical presentation with title and formula
- Includes proper animation timing and cleanup
- Enhances examples available for learning mathematical concepts with Manim
Overview: What does this pull request change?
This PR adds a new QuadraticFormula scene class to example_scenes/basic.py that demonstrates the mathematical visualization of the quadratic formula using Manim's animation capabilities.
Added QuadraticFormula example scene to basic.py for educational mathematical visualization
Motivation and Explanation: Why and how do your changes improve the library?
This contribution enhances the educational value of Manim's example collection by adding a clear, well-structured example that demonstrates:
- Mathematical Education: The quadratic formula is a fundamental concept in mathematics that benefits from visual presentation
- Best Practices: Shows proper use of Manim's Text, MathTex, animation timing, and scene cleanup
- Accessibility: Provides beginners with a simple but complete example they can learn from
- Documentation: Includes clear docstring and comments explaining the scene's purpose
The example follows Manim's established patterns while being educational and easy to understand, making it valuable for both learning Manim and teaching mathematics.
Links to added or changed documentation pages
No documentation pages were modified. This adds a new example scene to the existing example_scenes/basic.py file.
Further Information and Comments
- The example is self-contained and follows the same structure as other examples in
basic.py - Uses standard Manim objects (Text, MathTex) and animations (Write, FadeOut)
- Includes proper timing with
self.wait()calls for smooth animation flow - The mathematical formula is properly rendered using LaTeX syntax
Reviewer Checklist
- [ ] The PR title is descriptive enough for the changelog, and the PR is labeled correctly
- [ ] If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
- [ ] If applicable: newly added functions and classes are tested
Hi maintainers! 👋
The mypy check failures appear to be pre-existing issues in manim/utils/docbuild/autoaliasattr_directive.py (lines 177, 208, 231) related to ViewList/StringList type incompatibility, which are unrelated to my QuadraticFormula example addition in example_scenes/basic.py.
My changes only added a new educational example and don't touch the documentation build system. Could you please review the contribution itself? Thanks!