Find Intersection of two Circles

Geogebra File
Given:
- Points A, B
- Gives us the distance d between them
- Radiuses:
rA=∣AC∣rB=∣BC∣
Steps
Finding a
The two inner triangles give us:
- a2+h2=rA2
- b2+h2=rB2
Equaling by h2:
rA2−a2=rB2−b2
Substituting b=d−a:
rA2−a2=rB2−(d−a)2⇒rA2−a2=rB2−d2+2da−a2⇒rA2=rB2−d2+2da⇒a=2drA2−rB2+d2
Calculate angle γ

Geogebra File
Calculate α:
α=arccos(rAa)
Calculate β from the line AB:
β=arccos(d∣xA−xB∣)
This will give us the angle γ towards the point C:
γ=α−β
Calculate C:
[xCyC]=[xAyA]+rA[cos(γ)sin(γ)]
Alternative: Inverse Kinematics (?)
- γ like above: joint angle at A
- δ: joint angle at C
[xCyC]=[xAxB]+rA[cos(γ)sin(γ)]
[xByB]=[xCyC]+rB[cos(δ)sin(δ)]
Find γ and δ