Rotate¶
Qualified name: manim.animation.rotation.Rotate
- class Rotate(mobject=None, *args, use_override=True, **kwargs)[source]¶
Bases:
TransformAnimation 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_pointisNone, 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), )Methods
create_targetAttributes
path_arcpath_funcrun_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:
mobject (Mobject)
angle (float)
axis (Vector3DLike)
about_point (Point3DLike | None)
about_edge (Vector3DLike | None)
kwargs (Any)
- Return type:
None