Learn R Programming

retistruct (version 0.6.3)

sphere.cart.to.sphere.spherical: Convert from Cartesian to spherical coordinates

Description

Convert locations on the surface of a sphere in cartesian (X, Y, Z) coordinates to spherical (phi, lambda) coordinates.

Usage

sphere.cart.to.sphere.spherical(P, R = 1)

Arguments

P

locations of points on sphere as N-by-3 matrix with labelled columns "X", "Y" and "Z"

R

radius of sphere

Value

N-by-2 Matrix with columns ("phi" and "lambda") of locations of points in spherical coordinates

Details

It is assumed that all points are lying on the surface of a sphere of radius R.