Repository: ManimCommunity/manim
File: manim/animation/transform.py (Python)

Code before:

class ClockwiseTransform(Transform):
    """Transforms `Mobject`s by moving each of its points in a clockwise path to its target point.

    Examples
    --------

    .. manim:: ClockwiseExample

        class ClockwiseExample(Scene):
            def construct(self):
                dl, dr = Dot(), Dot()
                sl, sr = Square(), Square()

                VGroup(dl, sl).arrange(DOWN).shift(2*LEFT)
                VGroup(dr, sr).arrange(DOWN).shift(2*RIGHT)

                self.add(dl, dr)
                self.wait()
                self.play(
                    ClockwiseTransform(dl, sl),
                    Transform(dr, sr)
                )
                self.wait()

    .. manim:: ClockwiseTransform_vs_Transform

        class ClockwiseTransform_vs_Transform(Scene):
            def construct(self):
                # set up the numbers
                c_transform = VGroup(*[Integer(i) for i in range(1,4)])
                text_1 = Text("ClockwiseTransform", color=RED)
                c_transform.add(text_1)

                transform = VGroup(*[Integer(i) for i in range(4,7)])
                text_2 = Text("Transform", color=BLUE)
                transform.add(text_2)

                ints = VGroup(c_transform, transform)
                texts = VGroup(text_1, text_2).scale(0.75)
                c_transform.arrange(direction=UP, buff=1)
                transform.arrange(direction=UP, buff=1)

                ints.arrange(buff=2)
                self.add(ints, texts)

                # The mobs move in clockwise direction for ClockwiseTransform()
                self.play(ClockwiseTransform(c_transform[0], c_transform[1]))
                self.play(ClockwiseTransform(c_transform[1], c_transform[2]))

                # The mobs move straight up for Transform()

Review comment (suggestion):
I'm still not convinced this example is needed, but I won't block the PR over it. In general the idea of this is fine; just two things I'm not happy with: (1) the to "vs" examples are long (in the sense of animation time) which is also reflected by the documentation render time. From the latest documentation build log:
```
animation.transform.ClockwiseTransform.......................5.056s  => 2 EXAMPLES
                                                             1.069s ClockwiseExample
                                                             3.987s ClockwiseTransform_vs_Transform
animation.transform.CounterclockwiseTransform................5.428s  => 2 EXAMPLES
                                                             1.064s CounterclockwiseExample
                                                             4.364s CounterclockwiseTransform_vs_Transform
```
These 8 seconds could be spent on 8 shorter / more concise examples.

And (2), the fact that the integers on the bottom disappear while the ones in the middle remain gives these examples a somewhat inconsistent feeling (but this is a *very* high-level and nitpicky comment 😅).

Code after:

class ClockwiseTransform(Transform):
    """Transforms the points of a mobject along a clockwise oriented arc.

    See also
    --------
    :class:`.Transform`, :class:`.CounterclockwiseTransform`

    Examples
    --------

    .. manim:: ClockwiseExample

        class ClockwiseExample(Scene):
            def construct(self):
                dl, dr = Dot(), Dot()
                sl, sr = Square(), Square()

                VGroup(dl, sl).arrange(DOWN).shift(2*LEFT)
                VGroup(dr, sr).arrange(DOWN).shift(2*RIGHT)

                self.add(dl, dr)
                self.wait()
                self.play(
                    ClockwiseTransform(dl, sl),
                    Transform(dr, sr)
                )
                self.wait()

    """

    def __init__(
        self,
        mobject: Mobject,
        target_mobject: Mobject,
        path_arc: float = -np.pi,
        **kwargs,
    ) -> None:
        super().__init__(mobject, target_mobject, path_arc=path_arc, **kwargs)


class CounterclockwiseTransform(Transform):
    """Transforms the points of a mobject along a counterclockwise oriented arc.

    See also
    --------
    :class:`.Transform`, :class:`.ClockwiseTransform`

    Examples
    --------