View Single Post
# 3 16-11-2012 , 06:36 AM
ctbram's Avatar
Moderator
Join Date: Jan 2004
Location: Michigan, USA
Posts: 2,998
Given the latitude and longitude of Mecca

Mecca, Saudi Arabia Lat: 21 29 N Long: 39 45E

1. rewrite the lat and long such that north lat is + and south lat is - and East long is - and West long is + or...

Mecca, Saudi Arabia Lat: +21.29 Long: -39.45

2. To place Mecca at the pole

rotate about the y-axis (Long) to place Mecca on the Prime meridian then

then if the lat is positive rotate about the z-axis (90-Lat)

else if the lat is negative rotate about the z-axis (90+(-Lat))

So the rotations for Mecca would be

rotate about the y-axis -39 45/60 == -39.75 degrees then freeze rotational transforms and

rotate about the z-axis 89 60/60 - 21 29/60 == 68 31/60 == 68.52 degrees

Since you are working from a projection from a point at the center of the sphere my signs might not be correct but the basic idea is first rotate the earth about the pole so that Mecca lies on the Prime meridian (-39.75 degrees) and then rotate the earth along the Prime meridian until Mecca is at the Pole (68.52 degrees).

-Rick


"If I have seen further it is by standing on the shoulders of giants." Sir Isaac Newton, 1675

Last edited by ctbram; 16-11-2012 at 06:48 AM.