Help with geometry of triangles in spheres.

3dgeometryspherestriangles

I am trying to get my head around the geometry of triangles inscribed into spheres (not spherical triangles – the triangle itself is a plane). I have been working with triangles in circles, and now I need to extrapolate this to 3D. I'd like to learn this from basic principles, and so would appreciate a pointer at a primer or something similar, but I will include my exact problem below as well.

I have a triangle $\triangle ABC$, inscribed in a unit sphere, center $O$. $O$ is not on the plane $ABC$. Taking the circle around each side and with its center at $O$, bisect each side of the triangle and push that point out to a point on the surface of that circle. This gives us six chords of the sphere, $AX$, $XB$, $BY$, $YC$, $CZ$, $ZA$. I have done all the math to this point, using the circles $AB$, $BC$, and $CA$ around $O$, to get the lengths of the six new chords, and the angles at $O$ for each one. But now I want to figure out three NEW circles, $XY$, $YZ$ and $ZX$, around the same center point $O$, so I can work out those lengths and angles. These would still be unit circles, as the points are on the surface of the unit sphere I started with. The angle $\angle XOY$ would be the angle between the planes $ABO$ and $BCO$, if I'm not mistaken, but not sure how to get that angle, and not completely sure that that assumption is correct in the first place. (those planes intersect on the line $BO$, so is that angle just the same as $\angle ABC$? This seems too simple, but if I'm right, this makes my day much easier!)

This is only the first step in my project, so I really want to learn this stuff, not just get answers.
Any help getting my brain to pop out of 2D into 3D is appreciated, either to get directly to the answer here, or pointers to a good source to start learning (in which case I will come back and answer this myself).

Best Answer

Thanks to @brainjam, who has helped me plug through all the steps to get to my answer. Here it is step by step.

Given the distances $AB,BC,CA$ I need the co-ordinates of the points $A,B,C$ in 3D space to make this work. Because the triangle is arbitrary in its alignment on the sphere, I can rotate the sphere at will. So I placed point $B$ at $(1,0,0)$, and $A$ on the $xz$ plane.

The angle $\angle BOA$ = $\cos^{-1}\left(\dfrac{2-AB^2}{2}\right)$.

Then point $A = (\cos(\angle BOA),0,\sin(\angle BOA))$.

Point $C=(x,y,z)$ can be solved using the distances from points $A,B$ and $OC=1$.

$OC = 1 = \sqrt{x^2+y^2+z^2}$ which gives $1 = x^2+y^2+z^2$.

For x: $$ \begin{align} BC &= \sqrt{(x-1)^2+y^2+z^2} \\ BC^2 &= (x-1)^2+y^2+z^2 \\ BC^2 &= x^2 - 2x + 1 + y^2 + z^2 \\ BC^2 &= -2x + 2 \\ -2x &= BC^2-2 \\ x &=1-BC^2/2 \\ \end{align} $$

For y: $$ \begin{align} AC &= \sqrt{(x-A_x)^2+y^2+(z-A_z)^2}\\ AC^2 &= (x-A_x)^2+y^2+(z-A_z)^2\\ y^2 &= AC^2-(x-A_x)^2-(z-A_z)^2\\ y &=\sqrt{AC^2-(x-A_x)^2-(z-A_z)^2}\\ \end{align} $$

For z, substituting $y^2$ into $BC^2 = (x-1)^2+y^2+z^2$ gives $$ \begin{align} BC^2 &= (x-1)^2+z^2 + AC^2-(x-A_x)^2-(z-A_z)^2 \\ (z-A_z)^2-z^2 &= AC^2-BC^2+(x-1)^2-(x-A_x)^2 \\ A_z^2-2zA_z &= AC^2-BC^2+(x-1)^2-(x-A_x)^2 \\ -2zA_z &= AC^2-BC^2+(x-1)^2-(x-A_x)^2-A_z^2 \\ z &= \frac{AC^2-BC^2+(x-1)^2-(x-A_x)^2-A_z^2}{-2A_z} \\ \end{align} $$

Those three provide $C=(x,y,z)$ in terms of the initial lengths of the sides.

Now that I have the point coordinates of all three points, I can calculate the midpoints $M_{AB},M_{BC},M_{CA}$on each side.

Calculating the angle between each pair of midpoints using the dot product: $$\angle{M_{AB}OM_{BC}} = \cos^{-1}(M_{AB}\cdot M_{BC}/|M_{AB}||M_{BC}|)$$

and then the chord length between the points projected out along lines $OM_{AB}$ and $OM_{BC}$ to the surface of the sphere, is given by $$\frac{\sin(M_{AB}OM_{BC})}{\sin(0.5(180-M_{AB}OM_{BC}))}.$$