Skip to content

Conversation

@Brainsucker92
Copy link
Contributor

@Brainsucker92 Brainsucker92 commented Nov 4, 2025

Overview: What does this pull request change?

Motivation and Explanation: Why and how do your changes improve the library?

Links to added or changed documentation pages

Further Information and Comments

Reviewer Checklist

  • The PR title is descriptive enough for the changelog, and the PR is labeled correctly
  • If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
  • If applicable: newly added functions and classes are tested

@henrikmidtiby
Copy link
Contributor

This looks good.
I can make the following example work.

from manim import *

class arcScene(Scene):
    def construct(self):
        l1 = Line([0, 3, 0], [1, 2, 0])
        l2 = Line([-2, 3, 0], [1, 2, 0])
        circulararc = TangentialArc(l1, l2, radius=0.2, corner = (-1, -1))
        self.add(l1, l2, circulararc)

which results in this image.
arcScene_ManimCE_v0 19 0

To make the code run on my machine I had to do the following modification.

diff --git a/manim/mobject/geometry/arc.py b/manim/mobject/geometry/arc.py
index 19cf9353..b93ca8dd 100644
--- a/manim/mobject/geometry/arc.py
+++ b/manim/mobject/geometry/arc.py
@@ -50,7 +50,6 @@ from typing import TYPE_CHECKING, Any, Literal, Tuple, cast
 import numpy as np
 from typing_extensions import Self
 
-from manim import Line
 from manim.constants import *
 from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL
 from manim.mobject.types.vectorized_mobject import VGroup, VMobject
@@ -70,6 +69,7 @@ if TYPE_CHECKING:
 
     import manim.mobject.geometry.tips as tips
     from manim.mobject.mobject import Mobject
+    from manim.mobject.geometry.line import Line
     from manim.mobject.text.tex_mobject import SingleStringMathTex, Tex
     from manim.mobject.text.text_mobject import Text
     from manim.typing import (
@@ -499,7 +499,7 @@ class ArcBetweenPoints(Arc):
                 self.radius = np.inf
 
 
-type Corner = Tuple[Literal[-1, 1], Literal[-1, 1]]
+# type Corner = Tuple[Literal[-1, 1], Literal[-1, 1]]
 
 
 class TangentialArc(ArcBetweenPoints):
@@ -510,7 +510,7 @@ class TangentialArc(ArcBetweenPoints):
     """
 
     def __init__(
-        self, line1: Line, line2: Line, radius: float, corner: Corner = (1, 1), **kwargs
+        self, line1: Line, line2: Line, radius: float, corner: Any = (1, 1), **kwargs: Any
     ):
         self.line1 = line1
         self.line2 = line2

To improve this PR please consider the following

  • add an example of how to use the TangentialArc mobject.
  • add a unit test that verifies that the code works.

@NightyStudios
Copy link
Contributor

it looks cool! can you add a parameter to mirror the arc?
For now it looks like this: )>
But it would be awesome to also be able to do this: (>

@Brainsucker92
Copy link
Contributor Author

Brainsucker92 commented Nov 6, 2025

it looks cool! can you add a parameter to mirror the arc? For now it looks like this: )> But it would be awesome to also be able to do this: (>

Thanks for your suggestion. To be honest, I don't quite see the point of the extra parameter. Allowing the mirroring of the arc defeats the purpose of the class. Especially because the resulting arc would no longer be tangential to the two lines provided. Can you describe a specific use-case you have in mind?

@NightyStudios
Copy link
Contributor

it looks cool! can you add a parameter to mirror the arc? For now it looks like this: )> But it would be awesome to also be able to do this: (>

Thanks for your suggestion. To be honest, I don't quite see the point of the extra parameter. Allowing the mirroring of the arc defeats the purpose of the class. Especially because the resulting arc would no longer be tangential to the two lines provided. Can you describe a specific use-case you have in mind?

I was thinking about marking an angle in a triangle this way, but I think you're right. Thanks for replying!

@henrikmidtiby
Copy link
Contributor

I was thinking about marking an angle in a triangle this way, but I think you're right. Thanks for replying!

For that case the Angle mobject can be used.
https://docs.manim.community/en/stable/reference/manim.mobject.geometry.line.Angle.html

@NightyStudios
Copy link
Contributor

I was thinking about marking an angle in a triangle this way, but I think you're right. Thanks for replying!

For that case the Angle mobject can be used.
https://docs.manim.community/en/stable/reference/manim.mobject.geometry.line.Angle.html

Right, should have RTFM'ed, thanks for pointing out :)

@henrikmidtiby henrikmidtiby self-requested a review November 6, 2025 22:02
Copy link
Contributor

@henrikmidtiby henrikmidtiby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me!
Thanks for adding the example and a unit test.

@github-project-automation github-project-automation bot moved this from 🆕 New to 👍 To be merged in Dev Board Nov 6, 2025
@henrikmidtiby henrikmidtiby merged commit afa4692 into ManimCommunity:main Nov 6, 2025
22 checks passed
@github-project-automation github-project-automation bot moved this from 👍 To be merged to ✅ Done in Dev Board Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants