# Line-circle intersection in spherical geometry?

How does one calculate the intersections between a "line" (a Great Circle) and a circle in spherical geometry?

i.e. given start point (as lat,lon), heading, circle centre (as lat, lon) and circle radius (as a % of the sphere's radius), there will be between zero and two* locations where they meet.

## 2 Answers

This is just a special case of circle-circle intersection, because a great circle is just a circle with radius $\frac{\pi R}{2}$. If you embed your sphere in Euclidean $\mathbb{R}^3$ then a circle on the sphere is the intersection of a plane with the sphere (where the plane passes through the sphere's centre iff it's a great circle).

The intersection of the two circles is therefore the intersection of both planes and the sphere. This can be calculated by finding the intersection of the planes, which is a line except in special cases, and then finding the intersection of that line with the sphere.

OK my first attempt at this goes something like... 