mpas_tools.transects.intersection¶
- mpas_tools.transects.intersection(a1, a2, b1, b2)[source]¶
Based on https://stackoverflow.com/a/26669130/7728169 Find the intersection point between great circle arc from
a1toa2and fromb1tob2. The arcs should have already have been found to intersect by callingintersects()- Parameters
a1 (mpas_tools.transects.Vector) – Cartesian coordinates of the end points of two great circle arcs. The types of the attributes
x,y, andzmust either benumpy.arraysof identical size for all 4 vectors (in which case intersections are found element-wise), or scalars for at least one of either thea1anda2orb1andb2.a2 (mpas_tools.transects.Vector) – Cartesian coordinates of the end points of two great circle arcs. The types of the attributes
x,y, andzmust either benumpy.arraysof identical size for all 4 vectors (in which case intersections are found element-wise), or scalars for at least one of either thea1anda2orb1andb2.b1 (mpas_tools.transects.Vector) – Cartesian coordinates of the end points of two great circle arcs. The types of the attributes
x,y, andzmust either benumpy.arraysof identical size for all 4 vectors (in which case intersections are found element-wise), or scalars for at least one of either thea1anda2orb1andb2.b2 (mpas_tools.transects.Vector) – Cartesian coordinates of the end points of two great circle arcs. The types of the attributes
x,y, andzmust either benumpy.arraysof identical size for all 4 vectors (in which case intersections are found element-wise), or scalars for at least one of either thea1anda2orb1andb2.
- Returns
points (mpas_tools.transects.Vector) – An array of Cartesian points on the unit sphere indicating where the arcs intersect