{
angmap.cal
Convert from directions in the world to coordinates on the angular sphere image
-z is forward (outer edge of sphere)
+z is backward (center of sphere)
+y is up (toward top of sphere)
}
sb_u = 0.5 + DDx * r;
sb_v = 0.5 + DDy * r;
r = 0.159154943*acos(DDz)/sqrt(DDx*DDx + DDy*DDy);
DDy = Py*norm;
DDx = Px*norm;
DDz = Pz*norm;
norm = 1/sqrt(Py*Py + Px*Px + Pz*Pz);