(41) Intersection points between circles
|
12-01-2020, 12:17 AM
(This post was last modified: 12-01-2020 12:23 AM by Albert Chan.)
Post: #9
|
|||
|
|||
RE: Intersection points between circles
(11-30-2020 05:19 PM)rawi Wrote: alpha = arcsin((y2-y1)/z) If x2 ≥ x1, we have the correct angle. No correction is needed. If x2 < x1, calculated alpha should really be pi - alpha cos((pi - alpha) ± beta) = cos(pi - (alpha ∓ beta)) = cos(alpha ∓ beta) * -1 sin((pi - alpha) ± beta) = sin(pi - (alpha ∓ beta)) = sin(alpha ∓ beta) → sy does not require correction. Code: function intersection(p1,r1, p2, r2) lua> I = require'complex'.I lua> p1, r1 = 13+4*I, 6.8 lua> p2, r2 = 6+10*I, 4.0 lua> lua> intersection(p1,r1,p2,r2) 9.99870384656476+10.101821154325554*I 6.510943212258768+6.032767080968563*I lua> intersection(p2,r2,p1,r1) 9.99870384656476+10.101821154325554*I 6.51094321225877+6.032767080968563*I |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(41) Intersection points between circles - rawi - 11-25-2020, 03:07 PM
RE: Intersection points between circles - Albert Chan - 11-25-2020, 06:16 PM
RE: Intersection points between circles - rawi - 11-25-2020, 06:48 PM
RE: Intersection points between circles - Albert Chan - 11-26-2020, 12:22 AM
RE: Intersection points between circles - Albert Chan - 11-30-2020, 02:19 PM
RE: Intersection points between circles - rawi - 11-30-2020, 05:19 PM
RE: Intersection points between circles - Albert Chan - 11-30-2020, 09:03 PM
RE: Intersection points between circles - Albert Chan - 12-01-2020 12:17 AM
RE: Intersection points between circles - SlideRule - 11-30-2020, 08:51 PM
RE: Intersection points between circles - rawi - 12-01-2020, 09:25 AM
RE: Intersection points between circles - Albert Chan - 12-01-2020, 11:59 AM
RE: Intersection points between circles - rawi - 12-01-2020, 02:04 PM
RE: Intersection points between circles - Albert Chan - 12-10-2020, 01:34 PM
|
User(s) browsing this thread: 1 Guest(s)