Screenshot of Earth/Sun Relationship app
Figure 1 - A screenshot of the Earth/Sun Relationship tool running as a desktop application.
Download Application

Right-click the icon for your operating system and choose 'Save target as...'

       

I’ve been doing a fair bit of low-level optimisation work on my solar calculations code recently and, whilst I have a reasonably extensive test suite for it, nothing beats being able to actually see things in action and interactively put them through their paces. Also, I have been wanting to update my old Earth/Sun Relationship app for a while now with some new ideas and graphics, so the synergy of using it as a visual test seemed pretty logical. Thus here it is, a brand new version with lots of new features as a way of both examining and visualising the relationships involved and letting me test and validate my solar position code.

As you can probably see by the graphics, the new app was done in Processing using my 3D and UI libraries (the blueprint-like style is just a colour theme). The app basically displays a Sun-path diagram at any location on the surface of the Earth, shown as either a 3D globe or a flat 2D map. You can interactively move the location around using my new spherical cursor component or adjust the date/time to see how the position of the Sun appears relative to that location. However, it gets a bit more interesting if you turn on some of the additional overlays running along the bottom edge and/or view the Earth relative to it’s orbit around the Sun.

Additional Overlays

You can use the buttons running along the bottom edge of the app to toggle a number of different information overlays within the display.

Sky Dome
This toggles the Sun-path diagram displayed at the current location between either a 3D hemispheric sky dome or a flat 2D circular diagram. By default, this diagram shows in red the relative path of the Sun on the current day, as seen from that location, and an arrow indicating the current relative Sun position. However, you can also opt to view the entire annual Sun-path in this diagram.

Sun-Paths
This toggles the display of the annual Sun-path within the Sun-path diagram displayed at the current location. The annual Sun-path is represented in yellow by daily lines drawn for the 21st day of each month and hourly analemma lines for each hour of the day.

Tropics
This toggles the display of latitudinal lines on the Earth’s surface at the Topics of Cancer and Capricorn. These lines run at around 23.4° above and below the Equator and represent the extremes of latitude at which the Sun can appear directly overhead.

The exact latitudinal angles are determined by the tilt of the Earth’s axis of rotation relative to the plane of its orbit around the Sun, which does vary slightly over time due mainly to nutation and polar motion. However, this effect is very slight, fluctuating between about 22.1° and 24.5° over a period of around 41,000 years. It is currently decreasing by around 0.013 degrees (47 arc-seconds) per hundred years.

Circles This toggles the display of latitudinal lines on the Earth’s surface at the Arctic and Antarctic Circles. These lines run at around 66.56° above and below the Equator and represent the latitudes above which the Sun does not appear to rise above the horizon for some period of the year.

Again, the exact latitudinal angles are determined by the tilt of the Earth’s axis of rotation relative to the plane of its orbit around the Sun and vary slightly over time in the same way as the angles of the Topics.

Sub-Solar
This toggles the display of points on the Earth’s surface at which the Sun appears to be directly overhead. These points are derived by simply imagining a line running from the geometric centre of the Earth to the geometric centre of Sun, and they occur where that line intersects the Earth’s surface.

In this particular display, the subsolar point for the current Sun position is shown with a small yellow sphere and an arrow projecting from it, with two additional lines showing the subsolar path for the current day (as a latitudinal line at the current declination angle) and over the whole year at the current time (as an analemma line).

These points and lines will change dynamically as you change the date and time. On the December solstice, the subsolar path for the current day will run along the Tropic of Capricorn. On the June solstice, it will run along the Tropic of Cancer. During the March and September equinoxes, it will run along the line of the Equator.

Declination
This toggles the display of the declination angle of the Sun at it’s current position. This is shown as an angular dimension in degrees running from an arrow indicating the current Sun position to a corresponding line projected with the same longitude but located at the Equator.

Also displayed is an imaginary plane whose surface normal is the arrow indicating the current Sun position. The circular line at which the Earth’s surface intersects this plane represents the geometric horizon of the Sun, at which is it either sunrise or sunset depending on which side any particular location is. This is not the absolutely exact position of sunrise and sunset as atmospheric refraction effects and the fact that we take these values based on the very top of the solar disk rather than at the centre of the Sun, but it is still sufficiently indicative.

Different Viewpoints

In order to best visualise different aspects of the Earth/Sun relationship, it is possible to view them from a range of different viewpoints. The following is a brief description of these and the information they show.

Axis icon
This view focusses on the Earth itself, allowing you to rotate about its geometric centre with the axis of rotation aligned to the +Z axis. This view shows most clearly which area of the Earth’s surface is currently illuminated by the Sun and which areas are at sunrise/sunset.

Orbit icon
This view shows the indicative orbit of the Earth around the Sun. The XY plane represents the plane of the ecliptic, being the flat plane derived from the geometric centre of the Sun and the geometric centre of the Earth at any two different points on its orbit.

This view most clearly shows the relationship between the Earth’s axis of rotation and the plane of the ecliptic, and how this changes so significantly between the solstices and equinoxes.

GeoStationary icon
The binds together the current location and the current 3D view. It simulates the view from a satellite set in geo-stationary orbit exactly above the current location. If you move the location, the view changes with it. If you change the view, the current location also changes.

This is useful if you want to see how the Sun-path diagram changes in different locations as it always maintains the centre of the Sun-path diagram at the centre of the view.

Sun View icon
This locks the view to be exactly as the Sun would see the Earth based on it’s current axial rotation and orbital position. As the Sun is very distant from the Earth, the view is effectively orthographic as opposed to perspective.

You can only change this view by changing the date and time, If you try to rotate the Earth, a small red error message will display to remind you that the view is locked.

Elevation icon
This locks the view to being orthogonal, exactly horizontal and at 90 degrees to the current location. The aim of this viewpoint is to show the Sun-path diagram at the current location in elevation so that changing the current latitude makes the changing pattern of Sun-path lines for different latitudes immediately obvious.


Change Log

1.0.0 2014-05-12

  • Initial release.

Click here to comment on this page.