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/f90/mod/pix_tools.F90 


FORMAT

call ang2vec( theta, phi, vector )


ARGUMENTS

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


RELATED ROUTINES

This section lists the routines related to ang2vec

angdist
computes the angular distance between 2 vectors
vec2ang
converts the 3D position vector of point into its position angles on the sphere.
vect_prod
computes the vector product between two 3D vectors

Version 3.31, 2017-01-06