### Spherical Triangles:

A spherical triangle is formed on the surface of a sphere by the intersection of three great circles.

*Spherical triangle ABC formed on the surface of the sphere by three great circles.*

*A, B*and

*C*.

The sides are denoted by lower-case letters

*a*,

*b*,

*c*. On the unit sphere their lengths are numerically equal to the radian measure of the angles that the great circle arcs subtend at the centre (since the arc length, l = rθ).

*A spherical triangle with vertices A, B, C on a unit sphere, where the sides of the triangle a, b, c equal the angles created by the great circle planes.*

Similar to the sine and cosine laws of a *regular* triangle. The spherical triangle has its *spherical* sine and cosine laws:

Ok, so how do we go about drawing our diagram?

**Drawing a Sphere:**

The issue now is that lines at the back of the sphere are becoming mixed with those on the visible side. In the example at the top of the page, the hidden lines are dotted. How do we go about doing that?

### Latitudinal Lines:

Lets start by trying to break-up the circles that create the latitudinal lines: we’ll draw a solid arc for the visible side an a dotted one for the hidden:

- \begin{tikzpicture} [scale =4]
- \def\phi{10};
- \draw (0, 0) circle (1);
- %Draw latitudinal lines
- \foreach \latitude in {-80, -50, …, 80} {
- \pgfmathsetmacro\verticaloffset{cos(\phi)*sin(\latitude)};
- \pgfmathsetmacro\radius{cos(\latitude)};
- \tikzset{xyplane/.estyle={cm={1, 0, 0, cos(90 + \phi), (0, \verticaloffset)}}}
- \draw [xyplane] (\radius,0) arc (0:180:\radius);
- \draw [xyplane, dashed] (\radius,0) arc (360:180:\radius);
- }
- \end{tikzpicture}\\

This doesn’t look too bad, but if you have a keen eye a problem is noticeable. If we increase the view angle to say 50 degrees, this will exaggerate the effect: the lines above the equator become dotted too early, whilst the lines below are doted too late; clearly the view angle is changing which parts of the lines are visible.

So how do we determine which section of the latitudinal lines should be drawn as dotted and where they should be drawn as solid lines?

It turns out this derivation (I found) is quite lengthy… but here goes:

p, li { white-space: pre-wrap; }

Yay!

### Latitudinal Lines:

**References:**

- https://en.wikibooks.org/wiki/LaTeX/Macros
- http://www.texample.net/tikz/examples/spherical-and-cartesian-grids/
- http://www.texample.net/tikz/examples/map-projections/
- http://www.tug.org/tugboat/tb30-1/tb94roegel-spheres.pdf
- http://tex.stackexchange.com/questions/53445/how-to-draw-spherical-geometries-with-tex
- http://tex.stackexchange.com/questions/46850/how-can-i-draw-an-arc-from-point-a-b-on-a-3d-sphere-in-tikz/49589#49589
- http://melusine.eu.org/syracuse/pstricks/pst-solides3d/bonus/doc_trigo_spherique.pdf
- http://cahiers.gutenberg.eu.org/cg-bin/article/CG_2007___48_7_0.pdf
- www.math.nus.edu.sg/aslaksen/projects/Wu%20ChengYuan.pdf
- http://www.bu.edu/math/files/2013/08/tikzpgfmanual.pdf