car2sph: Cartesian to spherical coordinate conversion

View source: R/car2sph.R

car2sphR Documentation

Cartesian to spherical coordinate conversion

Description

Convert 3D Cartesian to spherical coordinates

Usage

car2sph(x)

Arguments

x

3-vector or n-by-3 matrix representing the Cartesian components (x,y,z) of n three-dimensional vectors

Value

Returns a 3-vector or a n-by-3 element matrix representing the spherical coordinates (r,theta,phi), where theta=0...pi is the polar angle measured from the north pole and phi=0...2*pi is the azimuth measured positively from the x-axis (ISO 80000-2:2019 physics convention).

Author(s)

Danail Obreschkow

See Also

sph2car


obreschkow/cooltools documentation built on Nov. 16, 2024, 2:46 a.m.