CS50's Introduction to Computer Science project
• 1 min read
A small project I've done as a final for a course in 2020.
I wanted to make something visual and cutesy so I decided to make a widget that shows the current phase of the Moon as well as the current placement of the Sun and the Moon at different coordinates.
I used Solunar API to get the sunrise and sunset times, etc. and based my calculations for positions on the widget on those.
Then I used canvas and vanilla js to put together the widget with a few simple animations:
The code is quite retro as I didn’t have much experience back then, I did manage to wrap it up on time and get it working!


