Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Say I have the spherical coordinates of some locations, specifically their longitude ($0$ to 360) and latitude (latitude = $0$ at equator, $90$ at north pole, $-90$ at south pole) on a sphere with a radius of $1$. If I wanted to convert to a different coordinate system, treating the point on the original equator at the original longitude of $X$ (looking for generalization here) as the north pole of a new longitude/latitude, any idea what formulae I would need to apply to convert the original coordinates?

(If you're interested, this problem arises as I try to graph the output of a statistical model's predictions for a spherical phenomenon. My graphics app can easily create a top-down 2D projection given latitude/longitude data, but I'd also like to create projections centered on arbitrary longitude points along the equator, so I thought the easiest route would be to treat the side-view as a new latitude/longitude coordinate system.)

share|cite|improve this question

Well, I ended up solving this myself after a little more thought. The solution is to convert from the (r, phi, theta) of spherical coordinates to the (x, y, z) of Cartesian coordinates, then swap the z-axis with one of the others before finally converting back to spherical coordinates again.

share|cite|improve this answer
I wish there was a method to directly convert/transform the system without going through Cartesian. Perhaps this related question might have a clue:… – syockit Feb 3 '14 at 9:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.