Module unit_sphere::vector::intersection
source · Expand description
The intersection module contains functions for calculating great-circle
intersections using vectors.
A pair of great circles intersect at two points unless they are coincident.
For example, points u and v in Figure1.
![]()
Figure 1 A pair of intersecting great circles
A great circle intersection point can simply be calculated by normalizing
the cross product of their
pole vectors.
If the resulting vector is too small to normalize, then the great circles
are coincident, in which case they effectively intersect everywhere.
If a pair of Arcs are on coincident great circles,
calculate_coincident_arc_distances calculates the distances between
Arc ends, zero if the Arcs overlap.
Otherwise use_antipodal_point determines which intersection point
is closer to the centroid
of the Arcs midpoints.
calculate_intersection_distances then calculates great-circle distances
along the Arcs to the intersection point.
Functions§
- Calculate the great-circle distances along a pair of
Arcs on coincident Great Circles to their closest (reference) points. - Calculate the great circle distances to an intersection point from the start points of a pair of great circle arcs, on different great circles.
- Calculate an intersection point between the poles of two Great Circles.
See: http://www.movable-type.co.uk/scripts/latlong-vectors.html#intersection - Calculate the great-circle distances along a pair of arcs to their closest intersection point or their coincident arc distances if the
Arcs are on coincident Great Circles. - Whether an intersection point is within an
Arc. - Determine whether the antipodal point is closer to the centroid of the
Arcs.