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 (np.ndarray) – The rotation axis as a numpy vector.

  • about_point (Sequence[float] | None) – The rotation center.

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

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),
            )

Methods

create_target

Attributes

path_arc

path_func