DEV Community

Cover image for Everything You Ever Wanted to Know about Sundials
Paul J. Lucas
Paul J. Lucas

Posted on • Updated on

Everything You Ever Wanted to Know about Sundials

Introduction

If you’re a programmer like me, you likely have nerdy interests other than programming, be it sci-fi (I was 9 years old when the original Star Wars was released and I saw it five times in the theater), or, as in my case, time-keeping devices such as pocket watches, grandfather clocks, and sundials.

I’ve owned a pocket watch since I was a kid, a grandfather clock since I moved to California in 1995, and, now that I have my own home and garden, I’ve finally been able to own my very own sundial.

Installing a sundial that actually tells the correct time (well, as correct as possible) is non-trivial and has lots of nerdy details. You can’t just buy a ready-made sundial and expect it to work well. Any accurate sundial has to be custom-made and positioned for a specific location on Earth.

If this interests you, join me on a nerdy descent into sundial minutia. Fair warning: there will be several asides, digressions, and tangents (some literal) along the way.

Sundial Primer

There are several different kinds of sundials. The most common are:

  • Equatorial.
  • Armillary.
  • Horizontal.

Equatorial Sundials

An equatorial sundial is perhaps the simplest. It’s a circular dial carved into 24 major slices with each of the 24 hours written on it:

Equatorial Sundial Plate

Each hour slice is 15° wide (because 360° ÷ 24 = 15°). To make a sundial with it:

  1. Insert a stick perpendicular to the dial through the center. (The formal name for the stick is the gnomon, pronounced “no-mahn.”)
  2. Tilt the gnomon and dial to an angle equal to your latitude where 0° is horizontal. (My latitude near San Francisco is approximately 37.8° north.)
  3. If you’re in the northern hemisphere, point the gnomon to true north; otherwise, true south.

If you’re thinking of using your iPhone’s Compass app to locate true north, don’t. (More on how to orient a sundial without a compass later.)

You want everything to be like this where we’re looking at the Earth in space from within the ecliptic and the sun to the right:

Equatorial Sundial in Space

where:

  • The red line shows San Francisco’s latitude of 37.8°.
  • The brown line represents “horizontal ground” in San Francisco, i.e., is the tangent line to the Earth’s surface at that point.
  • The orange line is the gnomon pointed true north, hence its angle relative to the brown line (ground) is also 37.8°.
  • The green disc is the sundial plate.

For now, we’ll ignore the Earth’s axial tilt because it makes things simpler.

Hence, the gnomon is oriented in space to match the direction of Earth’s axis. As the sun appears to move around the center of the gnomon, it will cast a shadow onto the plate. The location of the shadow tells you the apparent solar time where “solar noon” occurs when the sun is at its highest point in the sky.

From the perspective of being on the ground in San Francisco, an equatorial sundial would look like:

Equatorial Sundial in San Francisco

where we’re looking at the dial plate edge on. A curious thing about an equatorial sundial is that during the summer, the gnomon will cast a shadow onto the top of the dial, but during the winter, it will cast a shadow onto the bottom of the dial; and on the equinoxes, it will cast a shadow on both sides.

Armillary Sundials

Armillary sundials are generally more ornate than equatorial sundials, but solve the problem of always being able to tell the time without having to look under the dial plate in winter. A typical armillary sundial looks like:

Armillary sundial

Typical Armillary Sundial

In an armillary sundial, the dial plate in an equatorial sundial has been replaced with an equatorial ring where the hours are marked at the same 15° intervals on the inside. The arrow is the gnomon and casts a shadow onto the ring that can easily be read from any position at any time of year.

A curious thing about an armillary sundial is that on the days of the equinoxes, the gnomon casts no shadow since the top side of the equatorial ring casts a shadow over the bottom side because the sun’s path is exactly parallel to the ring.

In some designs, the equatorial ring is only partial since it only has to show daylight hours when the sun is above the horizon. The advantage of such designs is that the gnomon will still cast a shadow on the equinoxes so you can still tell what time it is.

The only other ring that’s necessary is the one in line with the gnomon (the longitudinal ring) to hold both the gnomon and equatorial ring in place. Other rings, if present, typically represent the tropic of cancer and tropic of capricorn, but none are needed for telling time.

Armillary spheres are closely related to armillary sundials except the former are typically even more ornate and used primarily to show various astronomical facets rather than tell time.

Armillary sundials are my favorite kind.

Horizontal Sundials

Horizontal sundials take up less space than armillary sundials, but also solve the problem of always being able to tell the time without having to look under the dial plate in winter. My horizontal sundial looks like:

Image description

My Sundial

Even though armillary sundials are my favorite, I got a horizontal sundial because an armillary sundial would have taken up too much space for the location in my garden.

My sundial was custom-made for my latitude and pedestal diameter by Robert Foster, specifically the Presentation model. It’s solid brass that will develop a patina over time. It includes a custom Latin inscription Tu lux mea that means “You are my light.”

If you’re wondering why this and other Latin inscriptions (such as ones you may have seen on buildings in the Neoclassical style such as some banks and courthouses) use the letter V instead of the letter U, it’s because the Latin alphabet originally didn’t have the letter U. The letter V was used for both the consonant V and the vowel U, that is they were pronounced differently, but written the same way. It wasn’t until the 14th century when U started to diverge from V, and wasn’t until the 17th century when U was used regularly. So if you’re doing a Latin inscription and want it to look ancient, use V instead of U (and I instead of J since J originally didn’t exist either).

As a bonus, you also now know why the letter “double-U” is written as W: because U was originally written as V and if you put two of the letter V together, you get VV or W.

While horizontal sundials may look simple, they’re actually more complicated because the shadow cast by the gnomon on an armillary equatorial ring is now being cast instead onto a flat surface. This has the effect making the hour lines no longer at equal 15° intervals. However, you can calculate the adjusted angles for the hour lines.

Given 𝜙 (latitude) = 37.8° and h for a given hour between, say, 1–6pm, you can calculate the angle of the hour line using this equation (with degrees converted into radians first, then back):

θ=arctan(sin(ϕ)×tan(h×15°)) \theta = \arctan(\sin(\phi) \times \tan(h \times 15\degree))

Doing the math yields: 1pm = 9.32°, 2pm = 19.48°, 3pm = 31.5°, 4pm = 46.7°, 5pm = 66.38°, and 6pm = 90°.

The hours between 6–11am are a mirror image of 1–6pm. Noon is, of course, 0°; 6am and 6pm are always 90°.

This has the effect of “squishing” the hours clustered around 12 making reading the time harder.

Horizontal sundials work better the farther away from the equator (higher latitude) they are because the hour lines become more evenly spaced. At a pole, a horizontal sundial would become an equatorial sundial.

For horizontal sundials, a distinction needs to be made regarding the gnomon:

Gnomon vs. Style

The gnomon is the entire triangular wedge that’s perpendicular to the dial plate; the style is only the upper straight edge of the gnomon.

When reading the time, it’s only the straight edge of the shadow cast by the style that matters. Before noon, read the left edge; after noon, read the right. (In the southern hemisphere, it’s the other way around.)

Additionally, it’s only the style that must be parallel to the Earth’s axis. (This matters if doing longitudinal time zone corrections — more later.)

The contour of the vertical edge doesn’t matter and so gives artistic license to sundial makers to make that edge have some flair.

Earth’s Axial Tilt and Orbit

In the old days after sundials were invented, but before clocks were, whatever time the sundial indicated was the time. After clocks were invented, however, if you had an accurate clock and a sundial in the same location, as the year progressed, the time indicated by the sundial would vary from being either slow (behind the time indicated by the clock) or fast (ahead of the clock).

As you know, the Earth is tilted on its axis approximately 23.5°. As you also know, the Earth’s orbit is unfortunately not circular, but slightly elliptical (thanks, Kepler!). As you might suspect, both of these realities affect the time indicated by a sundial and cause a discrepancy over the course of a year.

However, both these effects can be corrected for by using the equation of time:

Equation of Time

where:

  • The Y-axis is the difference in time between clock time and sundial time in minutes. A negative value means the sundial is slow; a positive value, fast.
  • The X-axis is the day of the year (hence 1 = Jan-1 and 365 = Dec-31).
  • The blue line is the Earth’s orbital eccentricity contribution to the discrepancy.
  • The green line is the Earth’s axial tilt contribution to the discrepancy.
  • The red line is the sum of the blue and green lines’ discrepancies yielding the “Equation of Time.”

From this chart, you can see:

  • The discrepancy is 0 on exactly four days a year around April 15, June 13, September 1, and December 25.
  • The discrepancy can be as much as approximately 14 minutes slow (around February 11) and approximately 16 minutes fast (around November 3).

When sundials were the only time-keeping devices, civilization was a lot simpler without either trains or instantaneous communication, so the discrepancies just didn’t matter.

To use the Equation of Time:

  1. Read the apparent solar time from a sundial.
  2. Using the Equation of Time, locate the current day along the X-axis.
  3. Subtract the corresponding value on the Y-axis from the apparent solar time to yield the correct clock time. (If the value is negative, add its absolute value.)

Some sundial designs have the equation of time chart engraved into them so you can look up the correction on the spot (but it’s not traditional).

Daylight Savings Time

To confound sundial readers even further, daylight savings time (DST) was invented. This means that, for most of the year, a sundial will be 1 hour behind clock time. Hence, when DST is in effect, you need to add 1 hour to the apparent solar time.

It is possible to make a sundial that takes DST into account by either:

  • Rotating only the hour labels 1 hour counter-clockwise. The style must continue to point true north (in the northern hemisphere). This would make the sundial right for approximately 8 months of the year rather than only 4; or:
  • Having two sets of hour labels: an outer set for standard time and an inner set for DST.

Of course, neither solution is traditional since DST didn’t exist when sundials were the primary time-keeping devices.

Time Zones

Lastly, time zones were invented that designate each of the 24 1000+ mile wide wedges of the Earth have the same clock time ignoring where the sun is in the sky. The only places where solar and clock times equal is at the longitude of the central meridian of each time zone. To calculate such a longitude where Z is your time zone offset:

λ=Z×15° \lambda = Z \times 15\degree

Hence for my location in California in the Pacific Time Zone, λ = –8 × 15° = –120°. That’s approximately in Groveland, California on the way to Yosemite.

For every degree east of a time zone’s central meridian, a sundial will be ahead of clock time by 4 minutes (because 24 hours × 60 minutes = 1440 minutes ÷ 360° = 4 minutes); for every degree west, behind by 4 minutes. Hence for me at approximately –122.2°, my sundial is nearly 9 minutes behind.

The convention for longitude is that you can express it either as (1) a decimal number where negative values are west of the Prime Meridian, positives are east; or (2) a positive triple of degrees-minutes-seconds numbers with either “W” (west) or “E” (east) explicitly appended, e.g., 122°12'2"W. The same is true for latitude but with either “N” (north) or “S” (south) appended.

You might now also realize that, with the exception of the very few people who live in towns that are on the central meridians of their time zones, time (relative to the sun) is wrong for almost everyone everywhere.

It is possible to make a sundial that takes your longitude within your time zone into account by either:

  • Similarly to taking DST into account, rotate only the hour lines and labels on the dial plate (clockwise for east of a meridian or counter-clockwise for west); or:
  • Tilt the dial plate so that it’s parallel to the tangent line of Earth’s surface at the meridian and rotate the plate so the style again points at true north.

To illustrate the second option (where we’re looking north from the south pole and the curvature of the Earth has been greatly exaggerated for the distance between the cities):

Tilting the sundial plate

My sundial’s west edge would need to be tilted up by angle T so that its plate is parallel to one in Groveland. That can be calculated with the equation (again, with degrees converted into radians first, then back):

T=sin(λdiff)×cos(ϕ) T = sin(\lambda_{diff}) \times cos(\phi)

where λdiff\lambda_{diff} (the difference in longitude between my location and the meridian) = 2.2° (because 122.2° – 120° = 2.2°) and 𝜙 (latitude) = 37.8°. Doing the math yields T = 1.76°. To convert that into a distance, multiply by my sundial’s diameter of 9.5" to get T" = .288".

My sundial would also need to be rotated counter-clockwise to compensate for the tilt so that the style once again points true north:

Rotating the sundial plate

In (a), we’re looking down on the gnomon from directly above before the plate has been tilted. In (b), the west edge of the plate has been tilted up, but this causes the style no longer to point true north. To compensate, the plate must be rotated counter-clockwise by angle R to yield (c). That angle can be calculated with the equation:

R=sin(λdiff)×sin(ϕ) R = sin(\lambda_{diff}) \times sin(\phi)

Doing the math yields R = 1.35°. To convert that into a distance, again multiply by my sundial’s diameter of 9.5" to get R" = .244".

Orienting a Sundial without a Compass

As I mentioned, it’s not a good idea to orient a sundial using your iPhone’s Compass app. To orient a sundial without a compass, you can point the gnomon’s shadow at 12 exactly at just the right clock time by taking both the equation of time and the longitude of the sundial into account and calculating.

While I could have used a spreadsheet, being a programmer, I wrote a program in C to do the calculations (of course I did):

#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <time.h>

double calc_eot_min( unsigned year, unsigned day_of_year ) {
  // See https://en.wikipedia.org/wiki/Equation_of_time
  double const D = 6.24004077 + .01720197 * (365.25 * (year - 2000) + day_of_year);
  double const orbit = -7.659 * sin( D );
  double const tilt  =  9.863 * sin( 2 * D + 3.5932 );
  return orbit + tilt;
}

double calc_long_min( double sundial_long ) {
  double const central_long = round( sundial_long / 15 ) * 15;
  return (sundial_long - central_long) * 4;
}

void print_sundial_time( unsigned month, unsigned day_of_month, bool is_dst,
                         unsigned solar_hour, unsigned solar_min,
                         double eot_min, double long_min ) {
  unsigned clock_hour = solar_hour + is_dst;
  int      clock_min  = solar_min  + round( -(long_min + eot_min) );

  if ( clock_min < 0 ) {
    --clock_hour;
    clock_min += 60;
  } else if ( clock_min > 59 ) {
    ++clock_hour;
    clock_min -= 60;
  }

  printf( "%2u/%02u %02u:%02u %+d %+6.2f %+6.2f %02u:%02d\n",
    month, day_of_month,
    solar_hour, solar_min, is_dst,
    - eot_min, - long_min,
    clock_hour, clock_min
  );
}

int main() {
  double const sundial_long = -122.2006;

  time_t const now = time( /*tloc=*/NULL );
  struct tm const *const tm = localtime( &now );

  print_sundial_time(
    tm->tm_mon + 1,                     // month of year (0 - 11)
    tm->tm_mday,                        // day of month (1 - 31)
    tm->tm_isdst,
    12, 0,
    calc_eot_min( tm->tm_year + 1900, tm->tm_yday ),
    calc_long_min( sundial_long )
  );
}
Enter fullscreen mode Exit fullscreen mode

When executed, the program prints a line of output like:

 7/25 12:00 +1  +6.39  +8.80 13:15
Enter fullscreen mode Exit fullscreen mode

where:

  • +1 is for one additional hour since DST is in effect in July.
  • +6.39 is the equation of time correction in minutes (which is the negative of the value from the chart).
  • +8.8 is the longitude correction in minutes.
  • Their sum is the total correction added to 12:00 to yield 13:15.

In English, the output means: On July 25, when the gnomon’s shadow is at 12 exactly, it is actually 1:15pm. Hence, if at 1:15pm you orient the gnomon so its shadow is pointing at 12, it will be pointing at true north.

If you’ve understood the equations thus far, the C program is a straightforward coding of them. Even if you don’t know C, you should be able to understand the code. The only initial condition the program needs is the sundial’s longitude.

The program should ideally accept the sundial’s longitude as a command-line argument and perhaps options to specify an hour other than 12 and a date other than the current one, but such things are left as exercises for the reader.

If you’re not inclined to use either a spreadsheet or program, I found this SunAngle online tool. If you input the same values I’ve been using (for time basis, select Solar time) and click calculate, it outputs the same answer for clock time (so I’m confident my program is correct).

Confusingly, that online tool outputs the equation of time in hours rather than in minutes as is conventional (6.39 ÷ 60 = .11).

Side note: that tool must have been around for a long time since its FAQ includes a question about a Palm OS version.

Once the gnomon is oriented correctly, the tilt and rotation longitudinal adjustments can be done if desired.

Fixing a Ready-Made Sundial

You can adjust a ready-made sundial so that it has the same accuracy as a custom-made one. As a prerequisite for all sundials, its gnomon must point true north (or true south in the southern hemisphere).

For an armillary sundial, if the spherical part is adjustable relative to its base, tilt it so that the angle of the gnomon matches your latitude. That’s it.

For a horizontal sundial, another prerequisite is that the angles of all of its hour lines must be (a) correct for whatever latitude it was made for and (b) have its gnomon be at that latitude angle.

To determine if the hour angles are correct:

  1. Measure the angles of the hours from 1–5pm with an old-school protractor.
  2. Use the inverse equation (below) of the hour-angle equation given earlier to calculate 𝜙 (the latitude) for each hour.
  3. If all five values match, then that’s the latitude the sundial was made for.

If all five values do not match, then the sundial was made badly and there’s nothing you can do to make the sundial give the correct time.

The inverse equation to calculate 𝜙 (the latitude) for each hour h and its measured angle 𝜃 is (again, with degrees converted into radians first, then back):

ϕ=arcsin(tan(θ)tan(h×15°)) \phi = \arcsin \left( { \tan(\theta) \over \tan(h \times 15\degree) } \right)

Now measure the angle of the gnomon:

  • If its angle matches 𝜙 (the latitude), then the sundial was made correctly for that latitude.
  • If its angle does not match, but the gnomon is adjustable, adjust its angle so it matches 𝜙.
  • If its gnomon is not adjustable, then the sundial was made badly and there’s nothing you can do to make the sundial give the correct time.

Someone tried fixing a sundial in Golden Gate Park, but failed because they didn’t understand the math of sundials. The sundial was made for a latitude of 54°N, but the gnomon’s angle was hacked down to 38° for San Francisco so it’s inconsistent with its hour lines. That poor sundial can never give the correct time.

Also, if there’s anywhere in the world where you’d think they’d build a perfect sundial, it would be on the Prime Meridian in the park containing the Royal Observatory in Greenwich (yes, that Greenwich). Instead, they built the Greenwich Meridian Sundial that they botched in several ways. Fortunately, they also built the Equinoctial dial nearby that is always accurate to within 1 minute.

If you’ve ever wondered why “Greenwich Mean Time” has “Mean” in it, it’s because of the equation of time discrepancy applies just the same to when the sun passes directly over the Prime Meridian. Hence, “noon GMT” is the annual average, i.e., arithmetic mean of the moment when it happens.

Now for either a non-adjustable armillary sundial or a correctly made horizontal sundial for another latitude, you can make and insert a wedge under it to tilt it and rotate the whole thing to realign its gnomon with the Earth’s axis (similar to the earlier time zone adjustments).

To calculate the shape of the wedge and rotation angle, you can use this Sundial Wedge Calculator online tool.

The rotation instructions are a bit confusing since the tool says to do two rotations.

Miscellaneous

At low latitudes (including the equator) where horizontal sundials don’t work as well, you can use a vertical sundial mounted on a south facing wall (in the northern hemisphere), ideally facing true south, but, if not, the hour lines and labels can be skewed to compensate.

Sundials also work in the southern hemisphere, of course, but the direction of their hours is reversed, i.e., counter-clockwise.

If you’ve ever wondered why clockwise is, well, clockwise (turns to the right at the top), there is a likely answer.

TL;DR: 68% of the land on Earth is in the northern hemisphere (77% if you discount Antarctica), so most humans (87%) have lived there, including clock-makers. It therefore should come as no surprise that they made clocks whose hands turn in the same direction as gnomon shadows in the northern hemisphere.

At a pole, any sundial would “work,” but asking “What time is it?” at a pole is a nonsensical question.

Conclusion

I hope you got something out of my nerdy descent into the fiddly (but interesting) details of sundials.

References

Top comments (0)