Skip to content

Documentation / @interstellar-tools/maps / sinusoidal

Function: sinusoidal() ​

ts
function sinusoidal(
  phi: Radians,
  lambda: Radians,
  R: number,
  options?: ProjectionOptionsInterface
): ProjectedPointInterface;

Defined in: projections/sinusoidal.ts:68

Project a point on a sphere with the sinusoidal projection: an equal-area map, with every parallel at its true length.

x=R(λ−λ0)cos⁡φ,y=Rφ

Where:

  • φ and λ are the point's latitude and longitude (rad)
  • λ0 is the central meridian (rad)
  • R is the sphere's radius (m)

Units

  • Inputs: angles in radians, R in m.
  • Output: { x, y } in m.

Notes

  • Equal-area: a region's area on the map is its area on the sphere, so it suits geology, coverage and density maps. Shapes shear away from the central meridian and the equator.
  • Every parallel is drawn at its true length, and so is the central meridian. The other meridians are sine curves, which meet at the poles: the map is 2πR wide and πR tall.
  • Global planetary mosaics often use it, for example of Mars and the Moon.
  • λ−λ0 is wrapped to (−π, π], so the map is centred on the central meridian. −π itself stays on the left edge, so a line that ends there, like a ground track split at the antimeridian, isn't drawn across the map.

Parameters ​

ParameterTypeDescription
phiRadiansLatitude φ in radians (finite, in [−π/2, π/2]).
lambdaRadiansLongitude λ in radians (finite).
RnumberRadius R of the sphere in m (finite, > 0).
options?ProjectionOptionsInterfacelambda0, the central meridian (radians, defaults to 0).

Returns ​

ProjectedPointInterface

The point on the map, { x, y } in m.

Throws ​

  • If any input is not a finite number.
  • If phi is outside [−π/2, π/2], or R <= 0.

Example ​

ts
// 60° N, 90° E on a 1 737.4 km Moon: the parallel is half as long as the equator
sinusoidal(toRad(60), toRad(90), 1_737_400);
// ≈ { x: 1 364 551, y: 1 819 401 } m

See ​