Visibility Contours of the Sun and Moon

Create graphic visibility contours of the Sun and Moon at a user-specified calendar date and time.
4 Downloads
Updated 22 Jul 2025

View License

This MATLAB script, vcontour, can be used to display a visibility contour of the Sun or Moon at a user specified calendar date and time. The contour is displayed on a Mercator map of the world along with the sub-point of the celestial body.
User interaction with the script
The following is a typical user interaction with the vcontour script. The software requires a calendar date and UTC time along with the celestial body of interest. The relationship between Coordinated Universal Time, UTC, and local civil time, LCT, is given by UTC = LCT - DST + ZONE where LCTis the local civil time in 24 hour format, DST is the Daylight Savings Time status (0 = no, 1 = yes) and ZONE is the user’s time zone.
vcontour visibility contour of the sun and moon
=================================================
please input the calendar date
(1 <= month <= 12, 1 <= day <= 31, year = all digits!)
? 7,22,2025
please input the utc time
(0 <= hours <= 24, 0 <= minutes <= 60, 0 <= seconds <= 60)
? 9,0,0
celestial body selection
1 = sun
2 = moon
? 1

Cite As

David Eagle (2025). Visibility Contours of the Sun and Moon (https://uk.mathworks.com/matlabcentral/fileexchange/181570-visibility-contours-of-the-sun-and-moon), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2025a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0