@@ -387,9 +387,9 @@ def construct(self):
387
387
will interpolate the :class:`~.Mobject` between its points prior to
388
388
``.animate`` and its points after applying ``.animate`` to it. This may
389
389
result in unexpected behavior when attempting to interpolate along paths,
390
- or rotations.
390
+ or rotations (see :meth:`.rotate`) .
391
391
If you want animations to consider the points between, consider using
392
- :class:`~.ValueTracker` with updaters instead.
392
+ :class:`~.ValueTracker` with updaters instead (see :meth:`.add_updater`) .
393
393
394
394
"""
395
395
return _AnimationBuilder (self )
@@ -1029,6 +1029,9 @@ def construct(self):
1029
1029
:meth:`get_updaters`
1030
1030
:meth:`remove_updater`
1031
1031
:class:`~.UpdateFromFunc`
1032
+ :class:`~.Rotating`
1033
+ :meth:`rotate`
1034
+ :attr:`~.Mobject.animate`
1032
1035
"""
1033
1036
if index is None :
1034
1037
self .updaters .append (update_function )
@@ -1282,7 +1285,64 @@ def rotate(
1282
1285
about_point : Point3DLike | None = None ,
1283
1286
** kwargs ,
1284
1287
) -> Self :
1285
- """Rotates the :class:`~.Mobject` about a certain point."""
1288
+ """Rotates the :class:`~.Mobject` around a specified axis and point.
1289
+
1290
+ Parameters
1291
+ ----------
1292
+ angle
1293
+ The angle of rotation in radians. Predefined constants such as ``DEGREES``
1294
+ can also be used to specify the angle in degrees.
1295
+ axis
1296
+ The rotation axis (see :class:`~.Rotating` for more).
1297
+ about_point
1298
+ The point about which the mobject rotates. If ``None``, rotation occurs around
1299
+ the center of the mobject.
1300
+ **kwargs
1301
+ Additional keyword arguments passed to :meth:`apply_points_function_about_point`,
1302
+ such as ``about_edge``.
1303
+
1304
+ Returns
1305
+ -------
1306
+ :class:`Mobject`
1307
+ ``self`` (for method chaining)
1308
+
1309
+
1310
+ .. note::
1311
+ To animate a rotation, use :class:`~.Rotating` or :class:`~.Rotate`
1312
+ instead of ``.animate.rotate(...)``.
1313
+ The ``.animate.rotate(...)`` syntax only applies a transformation
1314
+ from the initial state to the final rotated state
1315
+ (interpolation between the two states), without showing proper rotational motion
1316
+ based on the angle (from 0 to the given angle).
1317
+
1318
+ Examples
1319
+ --------
1320
+
1321
+ .. manim:: RotateMethodExample
1322
+ :save_last_frame:
1323
+
1324
+ class RotateMethodExample(Scene):
1325
+ def construct(self):
1326
+ circle = Circle(radius=1, color=BLUE)
1327
+ line = Line(start=ORIGIN, end=RIGHT)
1328
+ arrow1 = Arrow(start=ORIGIN, end=RIGHT, buff=0, color=GOLD)
1329
+ group1 = VGroup(circle, line, arrow1)
1330
+
1331
+ group2 = group1.copy()
1332
+ arrow2 = group2[2]
1333
+ arrow2.rotate(angle=PI / 4, about_point=arrow2.get_start())
1334
+
1335
+ group3 = group1.copy()
1336
+ arrow3 = group3[2]
1337
+ arrow3.rotate(angle=120 * DEGREES, about_point=arrow3.get_start())
1338
+
1339
+ self.add(VGroup(group1, group2, group3).arrange(RIGHT, buff=1))
1340
+
1341
+ See also
1342
+ --------
1343
+ :class:`~.Rotating`, :class:`~.Rotate`, :attr:`~.Mobject.animate`, :meth:`apply_points_function_about_point`
1344
+
1345
+ """
1286
1346
rot_matrix = rotation_matrix (angle , axis )
1287
1347
self .apply_points_function_about_point (
1288
1348
lambda points : np .dot (points , rot_matrix .T ), about_point , ** kwargs
@@ -3143,7 +3203,7 @@ def override_animate(method) -> types.FunctionType:
3143
3203
3144
3204
.. seealso::
3145
3205
3146
- :attr:`Mobject.animate`
3206
+ :attr:`~. Mobject.animate`
3147
3207
3148
3208
.. note::
3149
3209
0 commit comments