๐ŸŒ™

Takbir

Physics-based Fajr calculation using Monte Carlo radiative transfer simulations to detect the exact moment when the white thread of dawn becomes visible

takbir.io ยท takbeer.io
ูˆูŽูƒูู„ููˆุง ูˆูŽุงุดู’ุฑูŽุจููˆุง ุญูŽุชูŽู‘ู‰ูฐ ูŠูŽุชูŽุจูŽูŠูŽู‘ู†ูŽ ู„ูŽูƒูู…ู ุงู„ู’ุฎูŽูŠู’ุทู ุงู„ู’ุฃูŽุจู’ูŠูŽุถู ู…ูู†ูŽ ุงู„ู’ุฎูŽูŠู’ุทู ุงู„ู’ุฃูŽุณู’ูˆูŽุฏู ู…ูู†ูŽ ุงู„ู’ููŽุฌู’ุฑู

"...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)

1

The Problem with Traditional Methods

Why geometric calculations fall short of the Quranic standard

๐Ÿ“

Traditional Method

  • Fixed 18ยฐ angle for everyone
  • Same time regardless of weather
  • Ignores clouds completely
  • No consideration for pollution
  • Mathematical abstraction only
VS
๐Ÿ”ฌ

Our Physics Method

  • Simulates actual light propagation
  • Real-time weather integration
  • Multi-layer cloud modeling
  • Aerosol and pollution effects
  • What you actually see

The Key Insight

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.

2

Real-Time Atmospheric Data

We gather data from multiple weather services to build an accurate model of today's sky

โ˜๏ธ

Cloud Coverage

Multi-layer cloud data including low, mid, and high altitude coverage with optical depth estimation

Source: Met.no Weather API
๐ŸŒก๏ธ

Atmospheric Profile

Temperature, pressure, and humidity at 19 altitude levels from surface to 23km

Source: GFS via Open-Meteo
๐ŸŒซ๏ธ

Aerosols & Dust

Pollution levels, desert dust concentration, and aerosol optical depth at 550nm

Source: CAMS Satellite Data
๐Ÿ”๏ธ

Terrain Elevation

Precise observer height above sea level for accurate horizon calculations

Source: SRTM via Open-Meteo
โ„๏ธ

Snow Coverage

Surface reflectivity mapping. Snow reflects twilight back into the sky

Source: IMS/NOAA Satellite
โ˜€๏ธ

Solar Position

Precise sun location computed using NASA JPL planetary ephemeris DE440

Source: NASA JPL
3

Intelligent Cloud Modeling

Combining multiple data sources to build an accurate 3D cloud structure

Stratosphere 22+ km
โ„๏ธ High Ice Clouds - OD: 2.5
Upper Troposphere 7-8 km
โ˜๏ธ Mid-Level Clouds - OD: 7.5
Lower Troposphere 3-4 km
โ˜๏ธ Low Stratus Clouds - OD: 20
โ˜€๏ธ
๐Ÿ‘๏ธ Observer at Ground Level

What is Optical Depth?

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.

4

Monte Carlo Radiative Transfer

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.

2M
Photons Simulated
49
Sun Angles
41
Wavelengths
GPU
Accelerated
๐Ÿ’ซ

Rayleigh Scattering

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 Interaction

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.

๐ŸŒซ๏ธ

Aerosol Effects

Dust, pollution, and haze particles absorb and scatter light based on their size and composition. Desert dust scatters differently than urban smog.

๐Ÿ”ต

Ozone Absorption

The ozone layer absorbs certain wavelengths, affecting the color and intensity of scattered twilight light passing through the stratosphere.

๐Ÿ”๏ธ

Surface Reflection

Ground reflects light back up. Snow reflects 80% (making twilight brighter), dark forest only 10%. This affects overall sky brightness.

๐Ÿ‘๏ธ

Human Vision Model

We weight the spectrum by mesopic (twilight) human eye sensitivity, centered at 530nm. This gives us the brightness you would actually perceive.

5

Understanding Twilight

As the sun descends, twilight progresses through distinct phases

๐ŸŒ…

Civil Twilight

Bright enough to read

0ยฐ - 6ยฐ below
๐ŸŒ†

Nautical Twilight

Horizon still visible

6ยฐ - 12ยฐ below
๐ŸŒƒ

Astronomical Twilight

Sky nearly dark

12ยฐ - 18ยฐ below
โœจ

TRUE FAJR

White thread visible

~14ยฐ - 16ยฐ typically

Our 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).

โœ“

The Final Result

Physics-accurate Fajr time for your location

Calculated Fajr Time
07:08
๐Ÿ“ Flensburg, Germany - December 31, 2025
30
Cloud OD
0.10
Aerosol OD
4
Cloud Layers
2M
Photons
๐ŸŒ™

Why This Matters for Ramadan

Accuracy in Fajr timing has real spiritual consequences

โฐ

If Fajr is Too Early...

You stop eating before necessary. Inconvenient and makes the fast harder, but the fast remains valid.

โš ๏ธ

If Fajr is Too Late...

You might eat after true dawn has begun. This could potentially invalidate the fast - a serious concern.

๐Ÿ“–

The Quranic Standard

The verse explicitly says "until it becomes distinct to you" - emphasizing visual observation, not geometric abstraction.

๐Ÿ”ฌ

Our Approach

By simulating actual light propagation through today's atmosphere, we honor both the Quranic definition and modern physics.

The Physics Honors the Fiqh

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.

โˆž

The Complete Pipeline

From your location to an accurate Fajr time in 8 steps

๐Ÿ“

1. Input Location & Date

Your latitude, longitude, and the date you want to calculate.

๐ŸŒ

2. Fetch Atmospheric Data

Gather real-time cloud coverage, temperature profiles, aerosols, elevation, and snow cover from advanced meteorological satellites..

โ˜๏ธ

3. Build Cloud Model

Detect cloud layers using humidity profiles and verify against satellite observations. Apply hybrid GFS + Met.no strategy.

๐ŸŒ

4. Construct Atmosphere

Creates a virtual atmosphere with real-time temperature, pressure, and humidity up to 23km altitude.

๐Ÿ’ซ

5. Run Monte Carlo Simulation

Trace 2 million photons through the atmosphere for 49 sun angles and 41 wavelengths using GPU acceleration.

๐Ÿ“Š

6. Process Spectra

Calculate human-perceivable brightness at each sun angle using mesopic vision response curves.

๐Ÿ“ˆ

7. Build Twilight Curve

Create smooth interpolation of brightness vs. sun angle using PCHIP splines for sub-degree precision.

๐ŸŽฏ

8. Find Threshold Crossing

Use Brent's root-finding algorithm to locate the exact moment when brightness equals the visibility threshold.