---
# System prepended metadata

title: Two Circles Intersect Points
tags: [Heron, math, geometry, two circles intersect points]

---

{%hackmd @RintarouTW/About %}

# Two Circles Intersect Points

<iframe src="https://rintaroutw.github.io/fsg/test/TwoCirclesIntersects.svg" width="883" height="625"></iframe>

$$
\cases{
|AP| = r_0\\
|BP| = r_1\\
|AB| = D\\
\vec{AB} = \pmatrix{c-a\\d-b}\implies rotate90^\circ(\vec{AB}) = \pmatrix{b-d\\c-a}\\
A = \pmatrix{a\\b}\\
\vec{m} = \frac{|m|}{D}\vec{AB}\\
\vec{p} = \frac{|p|}{D}rotate90^\circ(\vec{AB})\\
}\\
$$
:::info
$$
\because Heron's\ Formula\\
\triangle ABP = \frac{1}{4}\sqrt{(D+r_0+r_1)(-D+r_0+r_1)(D-r_0+r_1)(D+r_0-r_1)}\\
$$
:::
$$
\cases{
r_0^2 = |p|^2 + |m|^2\\
r_1^2 = |p|^2 + (D-|m|)^2\\
}\implies |m| = \frac{r_0^2-r_1^2+D^2}{2D}\\
\triangle ABP = \frac{D|p|}{2}\implies |p| = \frac{2\triangle ABP}{D}\\
\begin{array}l
P &= A + \vec{m} + \vec{p}\\
\pmatrix{x\\y} &= \pmatrix{a\\b} + \frac{|m|}{D}\vec{AB} + \frac{|p|}{D}rotate90^\circ(\vec{AB})\\
\pmatrix{x\\y} &= \pmatrix{a\\b} + (\frac{r_0^2-r_1^2+D^2}{2D^2})\pmatrix{c-a\\d-b}+\frac{2\triangle ABP}{D^2}\pmatrix{b-d\\c-a}\\
\therefore x &= a + \frac{(r_0^2-r_1^2)(c-a)}{2D^2} + \frac{c-a}{2} + \frac{2\triangle ABP}{D^2}(b-d)\\
&= \frac{a+c}{2} + \frac{(r_0^2-r_1^2)(c-a)}{2D^2} +  \frac{2\triangle ABP}{D^2}(b-d)\\
y &= \frac{b+d}{2} + \frac{(r_0^2-r_1^2)(d-b)}{2D^2} + \frac{2\triangle ABP}{D^2}(c-a)
\end{array}\\
$$


## References
- http://www.ambrsoft.com/TrigoCalc/Circles2/circle2intersection/CircleCircleIntersection.htm
- [Heron's Formula](/@RintarouTW/HeronFormula)


###### tags: `math` `geometry` `Heron` `two circles intersect points`