Skip to content

Scale

Animation Parameters#

Paremeters - as mentioned in Azarzadvillas Documentation - are:

  • Constructor : - self.play() - self.add()

  • Parameters :

  • run_time : The duration of the animation

    • float (ex: 3)
    • Optional
    • Default: DEFAULT_ANIMATION_RUN_TIME

Scale in PLace#

from manimlib import *

class AnimationScaleInPlace(Scene):
    def construct(self):

        square = Square()
        self.add(square)
        self.play(ScaleInPlace(square, 0.3))
from manim import *

class AnimationScaleInPlace(Scene):
    def construct(self):

        square = Square()
        self.add(square)
        self.play(ScaleInPlace(square, 0.3))

Grow From Center#

from manimlib import *

class AnimationGrowFromCenter(Scene):
    def construct(self):

        square = Square()
        self.play(GrowFromCenter(square))
from manim import *

class AnimationGrowFromCenter(Scene):
    def construct(self):
        square = Square()
        self.play(GrowFromCenter(square))

Shrink to Center#

from manimlib import *

class AnimationShrinkToCenter(Scene):
    def construct(self):

        square = Square()
        self.add(square)
        self.play(ShrinkToCenter(square))
from manim import *

class AnimationShrinkToCenter(Scene):
    def construct(self):

        square = Square()
        self.add(square)
        self.play(ShrinkToCenter(square))
Back to top