ScratchData LogoScratchData
Back to gmiller123456's profile

Basic Planetarium

GMgmiller123456•Created June 23, 2022
Basic Planetarium
12
10
515 views
View on Scratch

Instructions

Use up/down arrow to go to the next/previous day. Use left/right arrow to go to the next/previous hour. Use the sliders to set your latitude, longitude and time zone (or edit the first couple of lines in the "Sky" sprite). The default is Louisville, KY EDT. You can get your latitude from google maps by clicking a location and looking at the URL. The time zone should be the offset from UTC (e.g. -4 for Eastern Daylight Time). You may also specify any date and time by editing the "dateToJD" call, where it gets the current time.

Description

Is this the prettiest planetarium in the world? No. Is it the fastest? No. But, is it a great example of what you can do with basic programming tools? Also no. Before requesting a new feature be added, consider making a remix and giving it a try yourself! The possibilities are .... Astronomical! ... If you do make something, post a link below so I can see. And feel free to take the code and do something completely different. All of the algorithms here are reimplementations from https://www.celestialprogramming.com/ . The planet images are from NASA (solarsystem.nasa.gov), the horizon image is from Stellarium (GPL license). The star catalog is the Hipparcos catalog. The constellation lines are from Stellarium. The planet position algorithm is from The Explanatory Supplement to the Astronomical Almanac, Chapter 8. The Moon position algorithm is from the Astronomical Almanac D22. Pretty much all of the code is in the "Sky" sprite, the remaining sprites are mainly just user interface events.

Project Details

Project ID708233643
CreatedJune 23, 2022
Last ModifiedOctober 27, 2023
SharedJune 30, 2022
Visibilityvisible
CommentsAllowed