[soc.religion.islam] Recipe for the direction of Mecca

semiz@yalehp.bitnet (01/12/90)

______________________________________________________________________________

    Greetings to all...

  I think the direction of Mecca is the direction of the great circle
passing through your position and Mecca's.

  On how to find this direction, first some preliminaries from Math
(Vector Algebra) :
                    A plane is determined by the direction of one vector.
                         (The vector perpendicular to it)
                    A plane is spanned by two (noncolinear) vectors
                         That is, any point in a plane can be reached by
                         starting from a special point (origin) in the plane
                         and putting x numbers of the first vector and y
                         numbers of the second vector. x and y are called
                         the coordinates of that point in the plane.
                    Any vector in the plane is perpendicular to the vector
                         determining the plane.
                    The "cross-product" of any two vectors gives another
                         vector perpendicular to the first two (and length
                         equal to the product of the lengths of the first
                         two, if the first two are perpendicular.)

  Think of the earth in 3 dimensions. The great circle defines a plane.
The (unit) vector pointing from the center of the earth to Mecca (M) and
the (unit) vector pointing from the center of the earth to your location (Y)
are both in it. Therefore the vector (N) determining the plane will be
proportional to the cross-product of the two. We need the direction of
Mecca (K). This will be the tangent vector (at your location) of the great
circle. Being a tangent vector, it will be perp. to the radius vector, i.e Y.
Being in the plane, it will be perp. to N. Therefore it will be proportional
to the cross-product of the two. Finally, projections on the local east- and
north-vectors need to be taken.

  For those who know the math,
                                    N = Y cross M
                                    T = N cross Y (You can use the bac-cab
                                                   identity, if you want)
                 (The east component) e = T dot E  ( E is unit vector to
                                                     east, phi-hat)
                (The south component) s = T dot S  ( S is unit vector to
                                                     south, theta-hat)

  HERE IS THE STEP-BY-STEP RECIPE FOR NON-MATH PEOPLE

Your location - Latitude in (degrees)     L   =   ____
                Longitude in (degrees)    phi =   ____

                Colatitude in (degrees)     theta =  90 - L =  ____

Vector Y  - first component        Y1 = sin(theta)*cos(phi) = ____
          - second component       Y2 = sin(theta)*sin(phi) = ____
          - third component        Y3 = cos(theta)  =  ____

Location of Mecca - 23.2 deg N, 40.3 deg. E
                Colatitude in (degrees)     Mtheta =  66.8
                Longitude in (degrees)      Mphi = 40.3

Vector M  - first component        M1 = sin(Mtheta) * cos(Mphi) = .7010
          - second component       M2 = sin(Mtheta) * sin(Mphi) = .5945
          - third component        M3 = cos(Mtheta)  = .3939

Vector N = Y cross M
          - first component        N1 = Y2*M3 - Y3*M2  = ___
          - second component       N2 = Y3*M1 - Y1*M3  = ___
          - third component        N3 = Y1*M2 - Y2*M1  = ___

Vector T = N cross Y
          - first component        T1 = N2*Y3 - N3*Y2  = ___
          - second component       T2 = N3*Y1 - N1*Y3  = ___
          - third component        T3 = N1*Y2 - N2*Y1  = ___

Vector S  - first component        S1 = cos(theta) * cos(phi)  = ___
          - second component       S2 = cos(theta) * sin(phi)  = ___
          - third component        S3 = - sin(theta)            = ___

Vector E  - first component        E1 = - sin(phi)  = ___
          - second component       E2 =  cos(phi)   = ___
          - third component                      E3 =  0   (zero)

s = T dot S  = T1*S1 + T2*S2 + T3*S3                   =   ____

e = T dot E  = T1*E1 + T2*E2 + T3*E3 =  T1*E1 + T2*E2  =   ____

Now, take a sheet of paper. Draw directions, north-south-east-west (Of course,
    they will be perpendicular. Starting from the origin, measure s (cm,m,feet,
    whatever...) to south. Of course, if s is negative, you will be measuring
    to north. Starting from that point, measure e (in same units as s) to
    east. Of course, if e is negative, you will be measuring to west. Draw a
    line from the origin to this point.
This will give you the direction of Mecca.
    (This is true up to a sign. If you are to west of Mecca, i.e Middle-
    or West Europe, or the Americas, it gives the correct result. If you are to
    East of Mecca, i.e Asia, it will show the opposite direction, but this
    should be easy to correct by a look at the globe.)



Ibrahim Semiz       Yale-Physics      "semiz@yalehep"