Mapping Toolbox | ![]() ![]() |
Compute coordinates of a small circle path from center, radius, and arc limits
Syntax
pts = scircle1(lat,lon,rng) [latc,lonc] = scircle1(lat,lon,rng) [latc,lonc] = scircle1(lat,lon,rng,az) [latc,lonc] = scircle1(lat,lon,rng,units
) [latc,lonc] = scircle1(lat,lon,rng,az,units
) [latc,lonc] = scircle1(lat,lon,rng,az,geoid) [latc,lonc] = scircle1(lat,lon,rng,az,geoid,units
) [latc,lonc] = scircle1(lat,lon,rng,az,geoid,units
,npts) [latc,lonc] = scircle1(track
,lat,lon,rng...)
Background
A small circle is the locus of all points an equal surface distance from a given center. For true small circles, this distance is always calculated in a great circle sense; however, the scircle1
command allows a locus to be calculated using distances in a rhumb line sense as well. An example of a small circle is all points exactly 100 miles from the Washington Monument. Parallels on the globe are all small circles. Great circles are a subset of small circles, specifically those with a radius of 90º or its angular equivalent, so all meridians on the globe are small circles as well.
Small circle notation consists of a center point and a radius in units of angular arc length.
Description
[latc,lonc] = scircle1(lat,lon,rng) returns the coordinates of points along small circles centered at the points provided in lat
and lon
with radii given in rng
. These radii must in this case be given in the same angle units as the center points ('degrees
'). The coordinates for multiple small circles are stored in separate columns of latc
and lonc
.
[latc,lonc] = scircle1(lat,lon,rng,az) specifies the arc section of the small circle for which points are returned. The input az
is a one- or two-column vector. When az
has a single column, points are returned for the arc segment from 0° azimuth clockwise to the positive entries in az
(counterclockwise for negative entries). When az
has two columns, the returned points correspond to arc segments from the first-column entry clockwise to the second-column entry. When az
is empty or not provided, points for the entire small circle are returned.
[latc,lonc] = scircle1(lat,lon,rng,az,units
) specifies the units for the inputs and outputs, where units
is any valid angle units string. The default value is 'degrees'
.
[latc,lonc] = scircle1(lat,lon,rng,az,geoid,units
) specifies the elliptical definition of the Earth to be used with the two-element geoid
vector. The default geoid model is the sphere, which is sufficient for most applications. When a geoid is input, the range inputs in rng
must be in the units of the geoid semimajor axis, rather than in the angle units specified by units
.
[latc,lonc] = scircle1(lat,lon,rng,az,geoid,units
,npts) specifies the number of output points, npts
, returned per small circle. The default value of npts
is 100.
[latc,lonc] = scircle1(track,lat,lon,rng...) specifies the logic with which ranges are calculated. If the string track is 'gc'
(the default), great circle distance is used. It track is 'rh'
, rhumb line distance is used.
pts = scircle1(lat,lon,rng) returns the points in a two-column output pts
.
Examples
Create and plot a small circle centered at (0º,0º) with a radius of 10º:
axesm('mercator','MapLatLimit',[30 -30],'MapLonLimit',[-30 30]); [latc,longc] = scircle1(0,0,10); plotm(latc,longc,'g')
If the desired radius is known in some nonangular distance unit, use the radius returned by the almanac
function as the geoid to set the range units (use an empty azimuth entry to indicate a full circle):
earthradius = almanac('earth','radius','nm'); [latc,longc] = scircle1(0,0,550,[],earthradius); plotm(latc,longc,'r')
For just an arc of the circle, enter an azimuth range:
See Also
scircle2 |
Small circle from center and perimeter point |
track |
Connect waypoints with track segments |
scircleg |
Interactive small circles |
trackg |
Interactive tracks |
track1 track2 |
Great circles and rhumb lines |
![]() | scatterm | scircle2 | ![]() |