Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
Merzlikin-Matvey committed Aug 14, 2023
1 parent cf436f8 commit 20a8401
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions ManimExtra/mobject/geometry/intersection.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ def intersection_circles(circle_1: Circle, circle_2: Circle):


def intersection_line_and_circle(line: Line, circle: Circle):
o, r = circle.get_center() , circle.radius
o, r = circle.get_center(), circle.radius
h = Line(line.get_projection(o),o).get_length()
if h > r: return VGroup()
if h > r:
raise Exception('Circle and line do not intersect')

alpha = np.arccos(h/r)
x1 = Dot(Line(o,line.get_projection(o)).set_length_about_point(o,r).get_end())
x2 = x1.copy()
Expand Down
2 changes: 1 addition & 1 deletion ManimExtra/mobject/geometry/other.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self, A: np.ndarray, B: np.ndarray,C: np.ndarray, **kwargs):
biss_2 = Bisector(A, C, B).rotate(about_point=C, angle=PI/2)
I = intersection_lines(biss_1, biss_2)
r = Line(I, Line(A, C).get_projection(I)).get_length()
super().__init__(radius=r, arc_center=I)
super().__init__(radius=r, arc_center=I, **kwargs)

class CircumscribedCircle(Circle):

Expand Down

0 comments on commit 20a8401

Please sign in to comment.