The Maths
The Maths
[ This page is best viewed at 100% browser zoom on a screen resolution width > 1600 pixels or at 80% zoom on 1280 pixels resolution width ]
Scroll down to read
The slides explain the geometry and the mathematics behind the estimation process of the sun's elevation and its azimuth relative to the camera, from the position of the Vanishing Point VP, the Horizon center Hc, the Center of View C, and the focal distance f of the camera to the photographic plane. Read the section below for further analysis.
______
On this page, we have three sections: the first analyses the geometrical relations between the sun's angular position and the projected image on the photographic plate.
The second section aims to give a quick estimate of the height of the sun by analyzing the apparent elevation at the projected center of the horizon, where the perspective is generally less distorted.
The 3rd section shows how to implement the theoretical results in a simulation program able to render directly the sun's elevation and azimuth values on the photographic plane. We lock the origin of the Head-Up Display (HUD) to the Horizon Center Hc. This gives us a natural system of axes in the photo plane, with two possible readings for the coordinates of the Vanishing Point VP (see explanations below and examples on the Principles).
The chosen program for implementation is Blender® (an open-source 3D graphics software for creating animated films, visual effects, art, interactive 3D applications, virtual reality, computer games, etc.).
The sections are:
We will use a virtual plane, equivalent and homothetic to the photographic plate. That plane is a 2D projection of the scene before the camera and would give the same photo. The plane's distance f to the camera is proportional to the plate's focal distance FD. For angular estimates, the proportionality (or homothetic) factor is arbitrary (the real factor is negative because the photo is an inverted image on the plate).
Actually, from (10), (11), and (12), the elevation φ is always smaller than the apparent elevation γ or γ0 at Hc, the Horizon Center:
φ = atan(b cos(α) |sin(AZ)|) ≤ γ = atan(b cos(α)) ≤ γ0= atan(b) (15)
This is obvious in the video(*) where the camera rotates horizontally around Hc. We have φ (28.7°) ≤ γ (44°)≤ γ0(44°). γ can be seen as a function of AZ. The value of γ(AZ) reaches its minimum value, the elevation φ, when the azimuth is a right angle: γ(AZ = ±90°) = φ.
(*) The apparent height γ at the horizon Center Hc is a function of the relative azimuth AZ and is always above the actual sun's height φ (the black segment of the perpendicular protractor represents γ's locus; the grayed part is inaccessible). φ is the horizontal perspective's minimum angle γmin = φ when AZ = ±90°. In the example, γ(AZ=34.5°)=44°. For the purpose of the demonstration, the camera is horizontally locked (α=0° => γ=γ0) on Hc's height, distance, and direction. The revolving camera stops a few seconds at AZ=34.5° and 90° when apparent elevation γ is respectively ~44° and ~28.68° (= φ, the actual elevation value). We have tan(φ) = tan(γ).sin(|AZ|) ≈ 0.547.
The video makes use of the HTML5 <video> tag and needs a supported browser. You can also download the file. Protractors are generated by https://www.blocklayer.com/protractor-print.aspx and 3D processed in Blender®. The values of the φ and γ angles correspond approximately to the case of the Fatima D115 photo (see Fatima example).
______
Besides, equation (12) makes it easy to give a rough estimation of the elevation φ = atan(tan(γ0) cos(α) |sin(AZ)|), if we can estimate γ0, |sin(AZ)| and cos(α). This equation is interesting as it brings the influence of the focal distance f in the value of cos(α). However, as α is often small and negligible, we often have cos(α) ~ 1.0. Besides, in general, γ0 is easy to determine as the sun's apparent direction on the photo at Hc, the Horizon Center. So the main source of inaccuracy in estimating φ often comes down to the azimuth AZ estimate (relative to the photo's direction of view).
For easier reading of the Head-Up Display (HUD) in Blender®, its origin is locked to the Horizon Center Hc. This gives us in the natural system of axes, two possible readings for the coordinates of the Vanishing Point VP.
When the Sun is in the photo frame, its angular position is the same as the Vanishing point VP with
[φ; AZ] = [φVP; AZVP]
When the Sun is behind the camera, the indicated position on the Hc locked transparent HUD will be [φVP; AZVP]. However, the [φ; AZ] position of the Sun is opposite to the position of VP, actually, at [-φ; AZ-180°] in the same Camera horizontal system of axes (*) (see explanations and examples on the Principles). So the estimated position of the Sun is
[φ; AZ] = [-φVP; AZVP+180°]
The Sun has an elevation of 30° in the two figures but has an opposite azimuth. The camera is fixed. However, the HUD locked on Hc gives the same reading of AZ = -40° relative to the viewing direction (Left: the Sun is in front at about -40° relative azimuth; Right: the Sun is behind at 140° azimuth, as 140°= 180° -40°).
We also locked the photo in the xz plane at the xyz origin. The rendering is more intuitive and easier to read. It inverts the directions of the x and y axes and sets the origin at the Center of View C. The camera position is Cam = (0,f,0)T directed towards the negative y-axis.
We choose the positive angles for AZ in the direction of the X-axis, and the reference axis of AZ to be the direction of View (toward the negative Y-axis).
(*) Actually, by locking the Head-Up Display (HUD) to Hc, we change the system of axes between the Sun (behind the camera in that case) and VP, mirroring the reference axes to get VP at [-φ; AZ-180°] on the HUD. In the mathematical analysis in my paper where I analyzed a photo taken in Fatima on October 13, 1917, I indicated on page 34 that the relationship between the solar position [φ; AZ] and the reading of VP coordinates on the HUD was [-φ; -AZ]. Actually, it should be [-φ; AZ-180°], even if a change of axes and angle direction give [-φ; -AZ].