/* 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); }