A community-maintained Python framework for creating mathematical animations.
Docs: Added :class:`~.SurroundingRectangle` to example gallery (#1036)
kolibril13f52d4855c7de
diff --git a/docs/source/examples.rst b/docs/source/examples.rstindex 893b79602..2f87ed291 100644--- a/docs/source/examples.rst+++ b/docs/source/examples.rst@@ -94,7 +94,8 @@ Basic Concepts[[i * 256 / n for i in range(0, n)] for _ in range(0, n)])image = ImageMobject(imageArray).scale(2)- self.add(image)+ image.background_rectangle = SurroundingRectangle(image, GREEN)+ self.add(image, image.background_rectangle).. manim:: BezierSpline:save_last_frame:@@ -213,6 +214,16 @@ Animationsself.play(square.animate.scale(0.3))self.play(square.animate.rotate(0.4))+.. manim:: MovingGroupToDestination++ class MovingGroupToDestination(Scene):+ def construct(self):+ group = VGroup(Dot(LEFT), Dot(ORIGIN), Dot(RIGHT, color=RED), Dot(2 * RIGHT)).scale(1.4)+ dest = Dot([4, 3, 0], color=YELLOW)+ self.add(group, dest)+ self.play(group.animate.shift(dest.get_center() - group[2].get_center()))+ self.wait(0.5)+.. manim:: MovingFrameBox:ref_modules: manim.mobject.svg.tex_mobject:ref_classes: MathTex SurroundingRectangle@@ -701,7 +712,6 @@ Advanced Projectsdef show_circle(self):circle = Circle(radius=1)circle.move_to(self.origin_point)-self.add(circle)self.circle = circle