Main Content

# rsphere

Radii of auxiliary spheres

## Syntax

```r = rsphere('biaxial',ellipsoid) r = rsphere('biaxial',ellipsoid,method) r = rsphere('triaxial',ellipsoid) r = rsphere('triaxial',ellipsoid,method) r = rsphere('eqavol',ellipsoid) r = rsphere('authalic',ellipsoid) r = rsphere('rectifying',ellipsoid) r = rsphere('curve',ellipsoid,lat) r = rsphere('curve',ellipsoid,lat,method) r = rsphere('euler',lat1,lon1,lat2,lon2,ellipsoid) r = rsphere('curve', ..., angleUnits) r = rsphere('euler', ..., angleUnits) ```

## Description

`r = rsphere('biaxial',ellipsoid)` computes the arithmetic mean i.e., `(a+b)/2` where `a` and `b` are the semimajor and semiminor axes of the specified ellipsoid. `ellipsoid` is a `referenceSphere`, `referenceEllipsoid`, or `oblateSpheroid` object, or a vector of the form ```[semimajor_axis eccentricity]```.

`r = rsphere('biaxial',ellipsoid,method)` computes the arithmetic mean if `method` is `'mean'` and the geometric mean, `sqrt(a*b)`, if `method` is `'norm'`.

`r = rsphere('triaxial',ellipsoid)` computes the triaxial arithmetic mean of the semi-major axes, `a`, and semi-minor axes, `b` of the ellipsoid, `(2*a+b)/3`.

`r = rsphere('triaxial',ellipsoid,method)` computes the arithmetic mean if `method` is `'mean'` and the triaxial geometric mean, `(a^2*b)^(1/3)`, if `method` is `'norm'`.

`r = rsphere('eqavol',ellipsoid)` returns the radius of a sphere with a volume equal to that of the ellipsoid.

`r = rsphere('authalic',ellipsoid)` returns the radius of a sphere with a surface area equal to that of the ellipsoid.

`r = rsphere('rectifying',ellipsoid)` returns the radius of a sphere with meridional distances equal to those of the ellipsoid.

`r = rsphere('curve',ellipsoid,lat)` computes the arithmetic mean of the transverse and meridional radii of curvature at the latitude, `lat`. `lat` is in degrees.

`r = rsphere('curve',ellipsoid,lat,method)` computes an arithmetic mean if `method` is `'mean'` and a geometric mean if `method` is `'norm'`.

`r = rsphere('euler',lat1,lon1,lat2,lon2,ellipsoid)` computes the Euler radius of curvature at the midpoint of the geodesic arc defined by the endpoints `(lat1,lon1)` and `(lat2,lon2)`. `lat1`, `lon1`, `lat2`, and `lon2` are in degrees.

`r = rsphere('curve', ..., angleUnits)` and ```r = rsphere('euler', ..., angleUnits)``` where `angleUnits` specifies the units of the `latitude` and `longitude` inputs as either `'degrees'` or `'radians'`.

## Examples

Different criteria result in different spheres:

```r = rsphere('biaxial',referenceEllipsoid('earth','km')) r = 6.3674e+03 r = rsphere('triaxial',referenceEllipsoid('earth','km')) r = 6.3710e+03 r = rsphere('curve',referenceEllipsoid('earth','km')) r = 6.3781e+03```

## Version History

Introduced before R2006a