dot product of two vectors in sphericals
DOCX · 19.2 KB
Open DOCX file
A brief note by Phil dated 3.26.05. It expands a·b in components using polar angles and azimuths to obtain cosγ = cosθa cosθb + sinθa sinθb cos(φa−φb). It then gives variants using latitude angle instead of polar angle and sign changes via shifted angles. It ends by matching one variant to sun-position equations he had derived earlier.
AI-written summary; may contain errors.
Extracted text (machine-read; may contain errors)
Dot product of two vectors in sphericals PhL 3.26.05
Imagine the picture of the two vectors a and b plotted in sphericals. What is the dot product? We can compute it in two ways
a b = abcosγ γ is the angle between the vectors
a b = Σaibi
Now
ax = a sinθacosφa
ay = a sinθasinφa
az = a cosθa
bx = b sinθbcosφb
by = b sinθbsinφb
bz = b cosθb
Then
a b = ab { sinθacosφa sinθbcosφb + sinθasinφa sinθbsinφb + cosθa cosθb }
= ab { sinθasinθbcosφa cosφb + sinθasinθbsinφa sinφb + cosθa cosθb }
= ab { sinθasinθb[cosφa cosφb + sinφa sinφb] + cosθa cosθb }
= ab { sinθasinθbcos(φa- φb) + cosθa cosθb }
Therefore we can identify
cosγ = cosθa cosθb + sinθasinθbcos(φa- φb)
Other forms:
Now if we replace polar angle θ by latitude angle ψ using θ = π/2-ψ in one or both places, we get four forms including the first form
cosγ = cosθa cosθb + sinθasinθbcos(φa- φb)
cosγ = cosθa sinψb + sinθacosψbcos(φa- φb)
cosγ = sinψa cosθb +cosψa sinθb cos(φa- φb) (*)
cosγ = sinψa sinψb + cosψacosψbcos(φa- φb)
Still more forms can be obtained by introducing minus signs according to
sin(π/2 + α) = cosα
cos(π/2 + α) = - sinα
For example
cosγ = cosθa cosθb + sinθasinθbcos(φa- φb)
=> cosγ = sin(π/2 + θa) cosθb – cos(π/2 + θa)sinθbcos(φa- φb)
Another way to get a minus sign is to use
cos(φa- φb) = – cos(π + φa- φb) = – cos(φa- φb -π)
Example: from sun position work I got these equations
x' = – R [cosθt sin(ωt)]
y' = R [sinθt sinθ1 – cosθt cosθ1 cos(ωt) ]
z' = R [sinθt cosθ1 + cosθt sinθ1 cos(ωt)] (E.9)
Here θt is in fact a latitude type angle that gives the latitude of the sun on the celestial sphere.
Meanwhile, θ1 is the polar angle of an observation site. So adjust symbols to get
x' = – R [cosψt sin(ωt)]
y' = R [sinψt sinθ1 – cosψt cosθ1 cos(ωt) ]
z' = R [sinψt cosθ1 + cosψt sinθ1 cos(ωt) (E.9)
The last one is case (*) above. The bracket there is just cosγ where γ is the angle between the sun's vector of length R, and the observer's up unit vector '. If you draw a simple picture, you see that z' = Rcosγ.
Similarly you could find an interpretation of the y' [...]. It is just geometry.