# 492928 Calculation of intersection points in java 2

The coordinates to calculate the intersections of two circles, I found the following functions:

d = distance circles (center)

k = Heron's formula for the area of a triangle

= x & y coordinates, coordinates 4 to be counted out, for every 2. change the "±" sign for a + or a -.

points with coordinates:

A = Xaya

B = xByB

A = rA

B = rB

d2 = (xB-xA) 2 + (yb-ya) 2

K = (1 / 4) sqrt (((rA + rB) 2-d2) (d2-(rA-rB) 2))

x = (1 / 2) (xA + xB) + (1 / 2) (xB-xA) (RA2-RB2) / d2 ± 2 (yb-ya) K/d2

y = (1 / 2) (YB + yA) + (1 / 2) (YB-yA) (RA2-RB2) / d2 ± -2 (xB-xA) K/d2

I want you to see that these formulas are calculated with the variables in there.

as test variables and responses that I send the following (to check).

A = {1, 7}

B = {27, 3}

rA = 20

rB = 15

This 4 (or 6) data you need

The answers you're supposed to get are:

d = 26.3

K = 149.1

A = {15.6, -6.7}

B = {19, 15.7}

(you get 4 x/y- coordinates back, Of course it may be that you do not know which of those belongs to another, but if you only get those 4 numbers which must come out!)

Beceriler: Her şey Kabul, Java

İşveren Hakkında:
( 2 değerlendirme ) Netherlands

Proje NO: #2238841

gypsicoder