ang2vec

Routine to convert the position angles $(\theta,\phi) $ of a point on the sphere into its 3D position vector (x,y,z) with $x = \sin\theta\cos\phi $, $y=\sin\theta\sin\phi $, $z=\cos\theta $.

Location in HEALPix directory tree: src/C/subs/chealpix.c 


FORMAT

void vec2ang(double theta, double phi, double *vector);


ARGUMENTS

name & dimensionality kind in/out description
       
theta double IN colatitude in radians measured southward from north pole (in [0,$\pi$]).
phi double IN longitude in radians measured eastward (in [0, $2\pi$]).
vector(3) double OUT three dimensional cartesian position vector (x,y,z). The north pole is (0,0,1)


RELATED ROUTINES

This section lists the routines related to ang2vec

vec2ang
converts the 3D position vector of point into its position angles on the sphere.

Version 3.82, 2022-07-28