diff --git a/ManimExtra/mobject/geometry/intersection.py b/ManimExtra/mobject/geometry/intersection.py index e961ffb..b0e5353 100644 --- a/ManimExtra/mobject/geometry/intersection.py +++ b/ManimExtra/mobject/geometry/intersection.py @@ -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() diff --git a/ManimExtra/mobject/geometry/other.py b/ManimExtra/mobject/geometry/other.py index ae9a180..7b8158b 100644 --- a/ManimExtra/mobject/geometry/other.py +++ b/ManimExtra/mobject/geometry/other.py @@ -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):