Help using Circles intersection
Closed this issue · 1 comments
penbeuz commented
Hello, trying to use your library for mechanical calculation but not being a mathematicians I don't understand how to use the result of intersection of circles.
C1 = Circle(Point(0,0),5)
C2 = Circle(Point(8,0),5)
l = Line(Point(4,0), Point(4,1))
A = C1.intersect(C2)
B = C1.intersect(l)
C = C2.intersect(l)
This is the result of circles intersection
A
[Point((5.014458341998072+0.010710064639031416j), (0.13325313668481312-0.40303121043641016j)),
Point((19.770205823088897-0.16649271512070937j), (0.17208666613531612+19.12754381209912j)),
Point((19.770205823088894-0.16649271512071231j), (-0.17208666613532006-19.12754381209912j)),
Point((5.014458341998073+0.010710064639031925j), (-0.1332531366848131+0.4030312104364105j))]
The expected points are on both intersections of line with circles
Point(4.0,3.0) in B
True
Point(4.0,-3.0) in B
True
Point(4.0,3.0) in C
True
Point(4.0,-3.0) in C
True
But not on intersection of circles
Point(4.0,3.0) in A
False
Point(4.0,-3.0) in A
False
What am I missing ?
Thanks an best regards
jan-mue commented
There seems to be a mathematical error in the formula that we use to calculate the intersections of two conics. The two circles should obviously have the two expected points of intersection and two additional complex points of intersection. I will look into this issue.