How do I find 3D space coordinates of a longitude latitude point.?

Dark Lord

New member
This is a question, I need a formula for converting between spherical and spacial coords where the size and location of the sphere are known.

(S) is a sphere in 3D space with a radius (Sr) and position (Sx,Sy,Sz) in 3D space. Its position is specified by the center of the sphere, where the surface is a distance of (Sr) from (Sx,Sy,Sz).

Case 1:
P is a point in 3D space which is on the surface of said sphere, and is known only in polar coords on the surface of S. (Plong) and (Platt) I'm looking for a formula to find the spacial coords of P (Px,Py,Pz).

Case 2:
The point (P) is now in space near the sphere (S). I need a formula, or method, to find the lattitude and longituted coordinates of the the nearest point on the spheres surface.

This is for programing.
 
Back
Top