Move To
Description
The move_to
function moves the center of a mobject to the center of another mobject or a specific point.
Parameters
point_or_mobject
(Point3D | Mobject): The target point or mobject to move to.
Examples
Example 1
Move a dot's center to a square's center.
from smanim import *
dot = Dot(color=DARK_GRAY, z_index=2)
square = Square(side_length=1, color=GRAY)
square.move_to(dot)
canvas.add(square, dot)
canvas.draw(crop=True, ignore_bg=True)