Physics-based Fajr calculation using Monte Carlo radiative transfer simulations to detect the exact moment when the white thread of dawn becomes visible
"...and eat and drink until the white thread of dawn becomes distinct to you from the black thread of night..."
Surah Al-Baqarah (2:187)
Why geometric calculations fall short of the Quranic standard
The Quran defines Fajr as when you can see the distinction "becomes distinct to you." On a heavily overcast day, thick clouds block the scattered twilight light, making the "white thread" visible later. Our physics simulation honors this by calculating what you would actually observe.
We gather data from multiple weather services to build an accurate model of today's sky
Multi-layer cloud data including low, mid, and high altitude coverage with optical depth estimation
Temperature, pressure, and humidity at 19 altitude levels from surface to 23km
Pollution levels, desert dust concentration, and aerosol optical depth at 550nm
Precise observer height above sea level for accurate horizon calculations
Surface reflectivity mapping. Snow reflects twilight back into the sky
Precise sun location computed using NASA JPL planetary ephemeris DE440
Combining multiple data sources to build an accurate 3D cloud structure
Optical depth (OD) measures how much light a medium blocks. An OD of 1 blocks 63% of light. An OD of 30 (heavy overcast) blocks 99.9999999999% of direct light. The tiny fraction that survives โ scattered multiple times is what creates the faint twilight glow you see. More clouds = less glow = later visible Fajr.
Tracing millions of photons through the atmosphere using GPU acceleration
We simulate 2 million virtual photons traveling through the atmosphere. Each photon can scatter off air molecules, interact with cloud droplets, pass through aerosols, or reflect off the ground. By tracing their paths, we calculate exactly how bright the sky appears at each sun angle.
Photons scatter off air molecules. Blue light scatters more than red - this is why the daytime sky is blue and why twilight has that characteristic color gradient.
Cloud droplets scatter light in all directions (Mie scattering). They block direct paths but create diffuse glow. Ice crystals in high clouds behave differently than water droplets.
Dust, pollution, and haze particles absorb and scatter light based on their size and composition. Desert dust scatters differently than urban smog.
The ozone layer absorbs certain wavelengths, affecting the color and intensity of scattered twilight light passing through the stratosphere.
Ground reflects light back up. Snow reflects 80% (making twilight brighter), dark forest only 10%. This affects overall sky brightness.
We weight the spectrum by mesopic (twilight) human eye sensitivity, centered at 530nm. This gives us the brightness you would actually perceive.
As the sun descends, twilight progresses through distinct phases
Bright enough to read
0ยฐ - 6ยฐ belowHorizon still visible
6ยฐ - 12ยฐ belowSky nearly dark
12ยฐ - 18ยฐ belowWhite thread visible
~14ยฐ - 16ยฐ typicallyOur simulation calculates the actual sky brightness at each sun position, then finds precisely when it crosses the human visibility threshold of 0.002 (our calibrated brightness unit).
Physics-accurate Fajr time for your location
Accuracy in Fajr timing has real spiritual consequences
You stop eating before necessary. Inconvenient and makes the fast harder, but the fast remains valid.
You might eat after true dawn has begun. This could potentially invalidate the fast - a serious concern.
The verse explicitly says "until it becomes distinct to you" - emphasizing visual observation, not geometric abstraction.
By simulating actual light propagation through today's atmosphere, we honor both the Quranic definition and modern physics.
Classical scholars defined Fajr based on observation - when they could see the first light. They couldn't account for clouds mathematically, so they observed directly. Our physics simulation is the computational equivalent of that observation. On a cloudy day, the simulation correctly shows that the "white thread" becomes visible later - just as a human observer would experience.
From your location to an accurate Fajr time in 8 steps
Your latitude, longitude, and the date you want to calculate.
Gather real-time cloud coverage, temperature profiles, aerosols, elevation, and snow cover from advanced meteorological satellites..
Detect cloud layers using humidity profiles and verify against satellite observations. Apply hybrid GFS + Met.no strategy.
Creates a virtual atmosphere with real-time temperature, pressure, and humidity up to 23km altitude.
Trace 2 million photons through the atmosphere for 49 sun angles and 41 wavelengths using GPU acceleration.
Calculate human-perceivable brightness at each sun angle using mesopic vision response curves.
Create smooth interpolation of brightness vs. sun angle using PCHIP splines for sub-degree precision.
Use Brent's root-finding algorithm to locate the exact moment when brightness equals the visibility threshold.