Translate

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

This translation represents a movement of a point from the origin along the x-axis by a specified distance. All other points in the plane, in particular the passed Mobject, are moved in such a way, that the distance to the moving point remain unchanged.

Examples

Example: TranslateExample

from manim import *

from hmanim.native import Circle, Point, Translate

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

        # Draw a circle.
        circle = Circle(
            center=Point(0.0, 0.0),
            radius=5.0,
            plane=plane,
        )
        self.add(circle)

        # Translate the circle horizontally by 3.
        self.play(Translate(circle, 3.0))
from hmanim.native import Circle, Point, Translate

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

        # Draw a circle.
        circle = Circle(
            center=Point(0.0, 0.0),
            radius=5.0,
            plane=plane,
        )
        self.add(circle)

        # Translate the circle horizontally by 3.
        self.play(Translate(circle, 3.0))