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

Code before:
        **kwargs: Any,
    ):
        self.start_angle = start_angle
        self.angle = angle
        self.radius = radius
        self.n_components = n_components
        self.arc_center = arc_center
        super().__init__(**kwargs)
        self.orientation = -1

    def init_points(self) -> None:
        self.set_points(
            OpenGLArc.create_quadratic_bezier_points(
                angle=self.angle,
                start_angle=self.start_angle,
                n_components=self.n_components,
            ),
        )
        # To maintain proper orientation for fill shaders.
        self.scale(self.radius, about_point=ORIGIN)
        self.shift(self.arc_center)

    @staticmethod
    def create_quadratic_bezier_points(
        angle: float, start_angle: float = 0, n_components: int = 8
    ) -> Point3D_Array:
        samples = np.array(
            [
                [np.cos(a), np.sin(a), 0]
                for a in np.linspace(
                    start_angle,
                    start_angle + angle,
                    2 * n_components + 1,
                )
            ],
        )
        theta = angle / n_components
        samples[1::2] /= np.cos(theta / 2)

        points = np.zeros((3 * n_components, 3))
        points[0::3] = samples[0:-1:2]
        points[1::3] = samples[1::2]
        points[2::3] = samples[2::2]
        return points

    def get_arc_center(self) -> Point3D:
        """
        Looks at the normals to the first two
        anchors, and finds their intersection points
        """
        # First two anchors and handles

Review comment (suggestion):
We have a type alias that's semantically more specific: `QuadraticSpline`, which is a `Point3D_Array` where the points describe a sequence of connected quadratic Bézier curves:
```suggestion
    ) -> QuadraticSpline:
```

Code after:
class OpenGLArc(OpenGLTipableVMobject):
    def __init__(
        self,
        start_angle: float = 0,
        angle: float = TAU / 4,
        radius: float = 1.0,
        n_components: int = 8,
        arc_center: Point3DLike = ORIGIN,
        **kwargs: Any,
    ):
        self.start_angle = start_angle
        self.angle = angle
        self.radius = radius
        self.n_components = n_components
        self.arc_center = arc_center
        super().__init__(**kwargs)
        self.orientation = -1

    def init_points(self) -> None:
        self.set_points(
            OpenGLArc.create_quadratic_bezier_points(
                angle=self.angle,
                start_angle=self.start_angle,
                n_components=self.n_components,
            ),
        )
        # To maintain proper orientation for fill shaders.
        self.scale(self.radius, about_point=ORIGIN)
        self.shift(self.arc_center)

    @staticmethod
    def create_quadratic_bezier_points(
        angle: float, start_angle: float = 0, n_components: int = 8
    ) -> QuadraticSpline:
        samples = np.array(
            [
                [np.cos(a), np.sin(a), 0]
                for a in np.linspace(
                    start_angle,
                    start_angle + angle,
                    2 * n_components + 1,
                )
            ],
        )
        theta = angle / n_components
        samples[1::2] /= np.cos(theta / 2)

        points = np.zeros((3 * n_components, 3))
        points[0::3] = samples[0:-1:2]
        points[1::3] = samples[1::2]
        points[2::3] = samples[2::2]