## Documentation Center |

Small circles from center and perimeter

`[lat,lon] = scircle2(lat1,lon1,lat2,lon2)[lat,lon] = scircle2(lat1,lon1,lat2,lon2,ellipsoid)[lat,lon] = scircle2(lat1,lon1,lat2,lon2,`

`[lat,lon] = scircle2(lat1,lon1,lat2,lon2)` computes
small circles (on a sphere) with centers at the points `lat1,lon1` and
points on the circles at `lat2,lon2`. The inputs
can be scalar or column vectors.

`[lat,lon] = scircle2(lat1,lon1,lat2,lon2,ellipsoid)` computes
the small circle on the ellipsoid defined by the input `ellipsoid`,
rather than by assuming a sphere. `ellipsoid` is
a `referenceSphere`, `referenceEllipsoid`, or `oblateSpheroid` object, or a vector
of the form `[semimajor_axis eccentricity]`. Default
is a unit sphere.

`[lat,lon] = scircle2(lat1,lon1,lat2,lon2,units)` and

`[lat,lon] = scircle2(lat1,lon1,lat2,lon2,ellipsoid,units,npts)` uses
the scalar input

`[lat,lon] = scircle2(track,...)` uses
the

`mat = scircle2(...)` returns a single output
argument where `mat = [lat lon]`. This is useful
if a single circle is computed.

Multiple circles can be defined from a single center point by
providing scalar `lat1,lon1` inputs and column vectors
for the points on the circumference, `lat2,lon2`.

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 `scircle2` function 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*.

Plot the locus of all points the same distance from New Delhi as Kathmandu:

axesm('mercator','MapLatlimit',[0 40],'MapLonLimit',[60 110]); load coast % For reference plotm(lat,long,'k'); % New Delhi lat1 = 29; lon1 = 77.5; % Kathmandu lat2 = 27.6; lon2 = 85.5; % Plot the cities plotm([lat1 lat2],[lon1 lon2],'b*') [latc,lonc] = scircle2(lat1,lon1,lat2,lon2); plotm(latc,lonc,'b')

Was this topic helpful?