Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

ShrinkToCenter

Grant Sanderson8c7dbe8efa69
diff --git a/animation/transform.py b/animation/transform.py
index e40ffa56e..c9981b28c 100644
--- a/animation/transform.py
+++ b/animation/transform.py
@@ -95,6 +95,14 @@ class SpinInFromNothing(GrowFromCenter):
"interpolation_function" : counterclockwise_path()
}
+class ShrinkToCenter(Transform):
+ def __init__(self, mobject, **kwargs):
+ Transform.__init__(
+ self, mobject,
+ Point(mobject.get_center()),
+ **kwargs
+ )
+
class ApplyMethod(Transform):
def __init__(self, method, *args, **kwargs):
"""