Rotate

Qualified name: manim.animation.rotation.Rotate

class Rotate(mobject=None, *args, use_override=True, **kwargs)[source]

Bases: Transform

Animation that rotates a Mobject.

Parameters:
  • mobject (Mobject) – The mobject to be rotated.

  • angle (float) – The rotation angle.

  • axis (Vector3DLike) – The rotation axis as a numpy vector.

  • about_point (Point3DLike | None) – The rotation center.

  • about_edge (Vector3DLike | None) – If about_point is None, this argument specifies the direction of the bounding box point to be taken as the rotation center.

  • kwargs (Any)

Examples

Example: UsingRotate

from manim import *

class UsingRotate(Scene):
    def construct(self):
        self.play(
            Rotate(
                Square(side_length=0.5).shift(UP * 2),
                angle=2*PI,
                about_point=ORIGIN,
                rate_func=linear,
            ),
            Rotate(Square(side_length=0.5), angle=2*PI, rate_func=linear),
            )
class UsingRotate(Scene):
    def construct(self):
        self.play(
            Rotate(
                Square(side_length=0.5).shift(UP * 2),
                angle=2*PI,
                about_point=ORIGIN,
                rate_func=linear,
            ),
            Rotate(Square(side_length=0.5), angle=2*PI, rate_func=linear),
            )

See also

Rotating, rotate()

Methods

create_target

Attributes

path_arc

path_func

run_time

_original__init__(mobject, angle=3.141592653589793, axis=array([0., 0., 1.]), about_point=None, about_edge=None, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

Parameters:
Return type:

None