Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

Link: PD: Earth/Sun

 

EARTH SUN RELATIONSHIP WEB APP.jpg

 

Overview

 

The aim of this app is to model the orbital relationship between the Earth and the Sun that results in what we see as relative solar motion. As well as displaying a full 3D Sun-path diagram at the selected site location, you can easily switch between geo-centric and helio-centric views as well as overlaying some information useful for understanding various characteristics of the relationship.

 

For example, turn on the 'Twilight' and 'Circles' overlays and then select 'Summer Soltice' in the 'Useful Dates' menu (). Click the 'Play' button () to animate the time and then look at the North and South poles to clearly see why the Arctic and Antarctic Circles are located where they are. You can do something similar with the 'Sub-Solar' and 'Tropics' options. There are several more that are worth exploring for yourself, such as looking at the Sun-path as you adjust the site latitude and seeing how Declination angle changes with date. Worth it if you can spend a bit of time playing around and experimenting with the model.

 

Background

 

This is another HTML5 version of one of my Java applets in Processing. Having recently done some low-level optimisation of my solar calculations, I needed a better way to actually see the code in action and to interactively put it through its paces. Even the most extensive test suite is never a substitute for a good hands-on visualisation.

 

Just doing this app I found really useful and even insightful. Working out different ways to show the various characteristics and how best to handle the two planetary projections actually changed how I thought about the calculations and led to some useful improvements. Hopefully some others might find it similarly useful as a way of better understanding solar motion.

 

Interesting Features

 

The following are some of the more interesting features of this app that I had quite a bit of fun implementing:

 

  • The simulated atmosphere in the geocentric view whose glow tracks solar position and fades away when in shadow,
  • Getting the starfield and Sun position to approximate infinite distance when panning and moving the view without compromising on too big a near/far depth buffer,
  • The texture blend between day-lit and shadowed regions of the Earth that show night lights as it rotates,
  • The texture blend between day-lit and shadowed regions of the Earth that show night lights as it rotates,
  • The 'View from Sun Position' camera view option in the 3D VIEW SETTINGS popover that shows an orthographic view of the Earth that synchronises with solar position,
  • The enhanced twilight banding when the 'Twilight' toggle is selected in the bottom-left button list, which required some interesting GLSL code, and
  • Visualising the distinction between geometric and actual sunrise/sunset due to the size of the solar disk and atmospheric refraction.

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...