Scale

class Scale(mobject: Mobject, factor: float, run_time=3, apply_function_kwargs: Dict[str, Any] | None = None, **kwargs)[source]

An animation that scales a circular object.

Examples

Example: ScaleExample

from manim import *

from hmanim.native import Circle, Dot, Point, Scale

class ScaleExample(Scene):
    def construct(self):
        # The plane that all our hyperbolic objects live in.
        plane = PolarPlane(size=5)
        self.add(plane)

        # Draw a circle.
        center = Point(3.0, 0.0)
        circle = Circle(
            center=center,
            radius=4.0,
            plane=plane,
            color=YELLOW,
        )
        self.add(circle)

        # Mark the circle center.
        dot = Dot(center, plane=plane)
        self.add(dot)

        # Scale the circle by a factor of 1.5.
        self.play(Scale(circle, 1.5))
from hmanim.native import Circle, Dot, Point, Scale

class ScaleExample(Scene):
    def construct(self):
        # The plane that all our hyperbolic objects live in.
        plane = PolarPlane(size=5)
        self.add(plane)

        # Draw a circle.
        center = Point(3.0, 0.0)
        circle = Circle(
            center=center,
            radius=4.0,
            plane=plane,
            color=YELLOW,
        )
        self.add(circle)

        # Mark the circle center.
        dot = Dot(center, plane=plane)
        self.add(dot)

        # Scale the circle by a factor of 1.5.
        self.play(Scale(circle, 1.5))