p_spoly_dist

Find shortest distances (angles) from points on a unit sphere to a spherical polyline.
93 Downloads
Updated 29 Aug 2015

View License

The following files are included:
p_spoly_dist.m - Compute the distances from a set of np points p(i), p(2), ..., p(np) on a unit sphere to the spherical polyline. Spherical polyline is defined as a set of nv-1 great circle arcs connecting nv ordered vertices v(l), v(2), ..., v(nv) on a spherical surface.
In case when all the projected points lie OUTSIDE of all polyline segments, the distance to a closest vertex of the polyline is returned
This function is similar to p_poly_dist function (http://www.mathworks.com/matlabcentral/fileexchange/19398-distance-from-a-point-to-polygon/content/p_poly_dist.m), but instead of Euclidean 2D plane, works on a spherical surface.
test_p_spoly_dist.m - a simple unit test for p_spoly_dist. Plots the results of a call to p_spoly_dist function in 3D
run_s_tests - a script that calls test_p_spoly_dist unit test for different input points and vertices.

Cite As

Michael Yoshpe (2024). p_spoly_dist (https://www.mathworks.com/matlabcentral/fileexchange/52734-p_spoly_dist), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Earth, Ocean, and Atmospheric Sciences in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0

Added missing slinspace.m file required by the unit test