sph2crt(theta,phi,1) phi (degrees) theta (degrees) x y z 0.000 0.000 1.000 0.000 0.000 22.500 0.000 0.924 0.000 0.383 0.000 22.500 0.924 0.383 0.000 22.500 22.500 0.854 0.354 0.383 0.000 45.000 0.707 0.707 0.000 22.500 45.000 0.653 0.653 0.383 0.000 67.500 0.383 0.924 0.000 22.500 67.500 0.354 0.854 0.383 0.000 90.000 0.000 1.000 0.000 22.500 90.000 0.000 0.924 0.383 octave explicit calculation phi (degrees) theta (degrees) x=cos(phi)*cos(theta) y=cos(phi)*sin(theta) z=sin(phi) 0.000 0.000 1.000 0.000 0.000 22.500 0.000 0.924 0.000 0.383 0.000 22.500 0.924 0.383 0.000 22.500 22.500 0.854 0.354 0.383 0.000 45.000 0.707 0.707 0.000 22.500 45.000 0.653 0.653 0.383 0.000 67.500 0.383 0.924 0.000 22.500 67.500 0.354 0.854 0.383 0.000 90.000 0.000 1.000 0.000 22.500 90.000 0.000 0.924 0.383 physics definition phi (degrees) theta (degrees) x=sin(theta)*cos(phi) y=sin(theta)*sin(phi) z=cos(theta) 0.000 0.000 0.000 0.000 1.000 22.500 0.000 0.000 0.000 1.000 0.000 22.500 0.383 0.000 0.924 22.500 22.500 0.354 0.146 0.924 0.000 45.000 0.707 0.000 0.707 22.500 45.000 0.653 0.271 0.707 0.000 67.500 0.924 0.000 0.383 22.500 67.500 0.854 0.354 0.383 0.000 90.000 1.000 0.000 0.000 22.500 90.000 0.924 0.383 0.000 mathematics definition phi (degrees) theta (degrees) x=sin(phi)*cos(theta) y=sin(phi)*sin(theta) z=cos(phi) 0.000 0.000 0.000 0.000 1.000 22.500 0.000 0.383 0.000 0.924 0.000 22.500 0.000 0.000 1.000 22.500 22.500 0.354 0.146 0.924 0.000 45.000 0.000 0.000 1.000 22.500 45.000 0.271 0.271 0.924 0.000 67.500 0.000 0.000 1.000 22.500 67.500 0.146 0.354 0.924 0.000 90.000 0.000 0.000 1.000 22.500 90.000 0.000 0.383 0.924