Repository: ManimCommunity/manim
File: manim/mobject/geometry.py (Python)

Code before:

    def get_vertices(self):
        """Get the vertices of a given polygon.

        Examples
        --------
        ::

            >>> sq = Square()
            >>> points = sq.get_vertices()
            >>> points
            array([[-1.,  1.,  0.],
                   [ 1.,  1.,  0.],
                   [ 1., -1.,  0.],
                   [-1., -1.,  0.]])

        Returns
        -------
        :class:`numpy.ndarray`
            Returns a list of the coordinates of polygon's vertices.
        """

        return self.get_start_anchors()

    def round_corners(self, radius=0.5):
        """Rounds off the corners of a polygon.

        Parameters
        ----------
        radius : :class:`float`, optional
            The curvature of the corners of the polygon.

        Examples
        --------

        .. manim:: PolygonRoundCorners
            :save_as_gif:

            class PolygonRoundCorners(Scene):
                def construct(self):
                    points = [[-4, -2, 0], [-2, 2, 0], [4, 2, 0], [2, -2, 0]]
                    parallelogram = Polygon(*points, stroke_color=LIGHT_PINK)
                    rounded_1 = Polygon(*points, stroke_color=LIGHT_PINK).round_corners(radius=0.5)
                    rounded_2 = Polygon(*points, stroke_color=LIGHT_PINK).round_corners(radius=1.5)

                    self.play(Transform(parallelogram, rounded_1))
                    self.wait(0.5)
                    self.play(Transform(parallelogram, rounded_2))
                    self.wait(0.5)

        See Also

Review comment (suggestion):
```suggestion
        """Rounds off the corners of the polygon.
```

Code after:

    def get_vertices(self):
        """Gets the vertices of the polygon.

        Examples
        --------
        ::

            >>> sq = Square()
            >>> points = sq.get_vertices()
            >>> points
            array([[-1.,  1.,  0.],
                   [ 1.,  1.,  0.],
                   [ 1., -1.,  0.],
                   [-1., -1.,  0.]])

        Returns
        -------
        :class:`numpy.ndarray`
            Returns a list of the coordinates of polygon's vertices.
        """

        return self.get_start_anchors()

    def round_corners(self, radius=0.5):
        """Rounds off the corners of the polygon.

        Parameters
        ----------
        radius : :class:`float`, optional
            The curvature of the corners of the polygon.

        Examples
        --------

        .. manim:: PolygonRoundCorners
            :save_as_gif:

            class PolygonRoundCorners(Scene):
                def construct(self):
                    points = [[-4, -2, 0], [-2, 2, 0], [4, 2, 0], [2, -2, 0]]
                    parallelogram = Polygon(*points, stroke_color=LIGHT_PINK)
                    rounded_1 = Polygon(*points, stroke_color=LIGHT_PINK).round_corners(radius=0.5)
                    rounded_2 = Polygon(*points, stroke_color=LIGHT_PINK).round_corners(radius=1.5)

                    self.play(Transform(parallelogram, rounded_1))
                    self.wait(0.5)
                    self.play(Transform(parallelogram, rounded_2))
                    self.wait(0.5)

        See Also