Skip to content

emresezer/Moon-Phase-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

🌕 Moon-Phase-Calculator

Python-based lunar phase calculation and visualization project


🎯 Purpose & Scope

Moon-Phase-Calculator is a Python project designed to calculate and visualize the current phase of the Moon based on a given date. It combines astronomical calculations with simple visualization, suitable for astronomers, photographers, and enthusiasts.

  • Calculates the Moon's phase for today or any specified date.
  • Displays textual representation of the Moon phase (e.g., New Moon, First Quarter, Full Moon).
  • Computes approximate illumination percentage.
  • Outputs results in a clear, readable format for easy observation planning.

🧩 Project Structure

📁 Moon-Phase-Calculator/
│
├── phase.py → English calculation and visualization script
├── evre.py → Turkish calculation and visualization script
└── README.md                → This file

⚙️ Installation & Usage

  1. Ensure Python 3.x is installed.
  2. Run the script for today's Moon phase:
    python phase.py

🧮 Physical / Astronomical Model

• Moon Phase Calculation:

The phase of the Moon is computed based on its age in the synodic month (~29.53 days):

Phase = (Current Date - Known New Moon Date) mod 29.53

Where:

  1. New Moon
  2. Waxing Crescent
  3. First Quarter
  4. Waxing Gibbous
  5. Full Moon
  6. Waning Gibbous
  7. Last Quarter
  8. Waning Crescent

• Illumination Calculation:

Illumination (%) = (1 - cos(Phase × 2π / 29.53)) / 2 × 100

This approximation provides the visible illuminated fraction of the Moon's disk.


About

Calculating Moon Phases using Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages