PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

Related simulators

Similar topics nearby (including related fields) — or browse all 51 in Astronomy & The Sky.

View category →
FeaturedSchool

Refraction

Launch Simulator

Light crossing boundaries. Snell's law with angle measurements.

NewSchool

Rainbow in a Droplet

Launch Simulator

Snell in a sphere: primary (1× internal reflection ~42°) and secondary (2× ~51°, reversed spectrum); scan b/R and n.

NewSchool

Prism & Dispersion

Launch Simulator

White light through a prism creating a rainbow spectrum.

NewSchool

Exoplanet Transit (limb darkening u₁, u₂)

Launch Simulator

Quadratic limb-darkened disk; grid-integrated F(t); TESS-like solar preset vs uniform-disk page.

NewSchool

Venus Phases (Galileo)

Launch Simulator

Heliocentric geometry: full disk vs crescent at inferior conjunction; Earth-view inset.

NewSchool

Single-Layer Climate (Toy)

Launch Simulator

S, α, ε: T_eff vs T_surface from gray-slab balance — intuition only.

PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Astronomy & The Sky/Sunset Atmospheric Refraction

Sunset Atmospheric Refraction

Geometric vs apparent horizon: lift of the solar disk from a layered atmosphere model.

Geometry vs apparent

-0.35°
0.58°

Near the horizon, air density gradients bend rays downward toward the observer, so the Sun can still appear above the horizon when its center is slightly below the geometric horizon. Typical near-horizon lift is on the order of half a degree — similar to the Sun’s angular diameter.

Measured values

Apparent elevation0.23°

About this model

Atmospheric refraction fundamentally alters our view of the sky, most dramatically at sunrise and sunset. This simulator visualizes how Earth's atmosphere bends, or refracts, sunlight, making the Sun appear higher above the geometric horizon than its true geometric position. The core principle is Snell's Law of refraction, n₁ sin θ₁ = n₂ sin θ₂, which describes how light changes direction when passing between media of different refractive indices. Here, the atmosphere is modeled as a series of concentric, uniform-density layers. As a light ray from the Sun enters each successive layer, its path bends slightly toward the denser air, creating a curved trajectory. The simulator calculates the cumulative bending angle, showing the resulting 'lift' of the solar disk. A key simplification is the use of a layered, spherically symmetric atmosphere, ignoring local variations like temperature gradients and turbulence. By interacting with the model, students learn to distinguish between the geometric horizon (a straight line from the observer) and the apparent horizon (where the sky meets the Earth as seen through the atmosphere). They can explore how the Sun's apparent position changes with atmospheric parameters, directly observing why we see the Sun before it geometrically rises and after it sets.

Who it's for: High school and introductory undergraduate astronomy or physics students learning about atmospheric optics, geometric optics, and observational astronomy.

Key terms

  • Atmospheric Refraction
  • Snell's Law
  • Refractive Index
  • Geometric Horizon
  • Apparent Horizon
  • Layered Atmosphere Model
  • Bending Angle
  • Solar Disk

How it works

Refraction is wavelength-dependent (green flash at extreme grazing cases) and varies with temperature profiles. This sim separates geometric altitude from a single effective lifting angle for teaching.

Frequently asked questions

Why does the Sun look flattened at sunset?
The flattening, or oval shape, occurs because refraction is stronger near the horizon. The bottom edge of the Sun's disk, being deeper in the atmosphere, is lifted more than the top edge. This differential refraction vertically compresses the Sun's apparent shape.
Does this model explain the green flash?
This simulator models the basic refraction that makes the green flash possible, but not the phenomenon itself. The green flash requires an additional effect: atmospheric dispersion, where different colors (wavelengths) of light are refracted by slightly different amounts, briefly separating them at the horizon under very clear conditions.
How accurate is the layered atmosphere model?
The layered model is a useful simplification for visualizing the cumulative effect of refraction. In reality, the atmosphere's density and refractive index change continuously, not in discrete steps. More precise predictions for navigation or astronomy use complex integral equations that account for this continuous gradient.
Does refraction affect stars and planets the same way?
Yes, all celestial objects are affected by atmospheric refraction when observed near the horizon. The amount of lift depends on the object's altitude angle, not its distance. For very precise observations, astronomers must correct for this shift to determine an object's true position.