# Predictive models for shadow length and direction on globe vs. flat earth

Experiment: measure pole shadow’s length (shdlen) and angle due NORTH (γ). Objective: see if such experiments can help us determine the shape of earth.

The problem we want to solve is a math problem: create a predictive model for shdlen and γ on globe AND flat earth. This predictive model should require the following input variables:

• lat/lon where the measurement is made
• Date and time(+timezone) when the measurement is made
• Elevation above sea level where measurement is made

The spreadsheet linked above has the predictions that we will explain here. If you have a google account, you can make a copy and play with it, and I encourage you to.

Basically you can input values (lat/lon, date and GMT offset) in the green columns on the left and get output values (shadow length and direction due north) in the blue/red columns.

The rest of this article will explain the math behind the spreadsheet. Note that this is only a guide (not at all comprehensive) to explain the math behind the spreadsheet. To fully grasp it, you’ll need to grab information from multiple sources: this article, the links referenced here, and the formulas on the spreadsheet.

### 2. Globe model

To get angles for the globe model we need to resort to formulas from solar Astronomy.

The Sun As A Source of Energy

The article linked above is a guide for solar energy professionals. We are mostly interested in parts 1 and 3 of that article. It basically tells us almost all we need to do to calculate expected length and direction of shadows. The details are already explained in the article, so I’ll just paste some of the most important concepts and formulas here.

The formula for Azimuth angle in that article is not very well suited for our spreadsheet, because the asin function has two solutions and there’s no easy way to interpret its results.

There’s another to calculate the azimuth due EAST, like this

I got the formula above from the source code on suncalc.net:

The spreadsheet calculates the intermediate angle results (in gray selected above), and then uses that to calculate shadow length and direction in the blue columns.

### 3. VPoint

For the flat earth model, it’s useful to find the point where the sun is directly above (it’s only one point at any given time, on both models). We’ll call this point “Vpoint” (Vertical point). It’s the point where the sun is directly above.

Finding this point is matter of time. Its longitude is a function of time of day, and the latitude is a function of the time of year (and this is related to δ and ω in the globe formulation above)

To find the longitude we will have to make an assumption:

ASSUMPTION 1: At longitude 0º, solar noon occurs the same time as official noon at GMT.

Then:

lon(VPoint) = -15 * (T–12)

where T is the GMT time, in hours.

To find the latitude, we should remember that Vpoint oscillates between the tropics throughout the year. It hits a maximum of 23.4º on june solstice, and a minimum of -23.4º on december solstice. If we model the time of year as a real number between 0 and 11.9999, then, the june solstice is roughly 5.7, and the december solstice is roughly 5.7+6 = 11.7. So we can model this oscillation as a sinoidal function of time of year, like this (note the formula for the sinoidal function in the screenshot below):

Then:

lat(VPoint) = 23.4*sin(2*PI*(TY-2.7)/12)

where TY is the time of year, in months.

So we now have the lat-lon coordinates for Vpoint.

### 4. Flat Earth: shadow length

In the picture above, A is the Vpoint and B is where we make the measurement, then the length of the shadow, in poles, is:

shdlen = tan(theta) = c/(HS-h)

where HS is the sun’s height above sea level, that we don’t know, so we’re fixing it at 3000 miles (and we can easily play with this number changing only one cell in the spreadsheet). So finding the length shdlen is, again, a matter of finding the distance c between A and B, from their coordinates.

If we consider the triangle below we can use the law of cosines to calculate c.

There’s only the problem of calculating a, b and λ from the coordinates of A and B. Since the flat Earth doesn’t have its own coordinate system, we need to make a few assumptions about what latitude and longitude mean on a flat earth. So this is what we’re going to assume:

ASSUMPTION 2: longitudes track the angle to the north pole. This makes sense because we can actually verify that time differences and longitudes conform to the 15º/hour rate that is expected.

ASSUMPTION 3: Straight distances in the NORTH-SOUTH direction are proportional to latitude differences, with a ratio = 111.317 Km/º. This is easily verifiable in reality (Google Maps is indeed able to accurately predict driving distances).

Then:

a = 111.317*(90 - latB)
b = 111.317*(90 - latA)
λ = latB - latA

And then we find c, and length-flat (columns P and R below).

### 5. Flat Earth: shadow direction

If we consider the same triangle ABC as before, the shadow is the black segment, and the shadow direction is given by the angle γ above. Find β = find γ. To find β, we can use the law of cosines again, starting with side b and then isolate β. The result is column Q below.

In the picture above, γ is a positive angle (clockwise from north direction), but that may not always be the case. We need to look at the four main possible scenarios for the relative position of A (directly below the sun) and B (where the vertical pole is stuck on the ground).

In the picture above we can see that when B is west of A, then γ is a negative angle (conter-clockwise from north), so we need to multiply it by -1. The resulting formula (with a few additional treatment that we’ll explain later) is in column S below.

Night-time exclusion

In columns N, O, R and S above there’s a conditional on α<0 to prevent generating values where it’s night according to the globe model (we don’t have a way to geometrically predict night time on the flat model).

Actually, on column N, we use a threshold of 0.1 instead of 0, to exclude globe shadow lengths that would be too big and hard to compare with flat shadow lengths.

Angle range:[0, 360] vs. [-180, 180]

Depending on which direction the shadow is spinning, it is more convenient to use one range or the other, so that the shadow signature is a smooth curve without any discontinuities (a “jump” from 360 to 0).

When the shadow is moving clockwise (pointing north at solar noon), it’s better to look at values growing from -90-ish to +90-ish. When the shadow is moving conter-clockwise (pointing south at solar noon), it’s better to look at values decreasing from 270-ish to 90-ish.

Which one to use is a function of latitude, so depending on which tab you are in the spreadsheet you’ll see one of the two trimming functions below being applied on columns O and S:

### 7. Prediction curves.

With the numbers generated from the spreadsheet, we can plot charts that show how predicted lengths and directions vary throughout the day. Those charts are what I call shadow signatures.