next up previous contents
Next: (vector z) = (zero Up: Vector Algebra Previous: Vector Algebra   Contents

cartesian vector from polar coordinates

 
/* sphrv - radius vector                   */
/* cartesian vector from polar coordinates */

void sphrv(w,r,th,ph) double *w, r, th, ph; {double s;
s=r*sin(th);
w[0]=s*cos(ph);
w[1]=s*sin(ph);
w[2]=r*cos(th);
}



Pedro Hernandez 2004-05-13