6 ms·
Show HN: Sun Clock: a 24hr clock that shows the position of the sun
- perilunar 4y agoSun Clock is a 24-hour clock that displays the position of the sun, and sunrise, solar noon, sunset, golden hour, and twilight times for your current location. It also shows the current position and phase of the moon, and its rising and setting times.
- gardenfelder 4y agohttps://github.com/virtualgeoff/sunclock https://github.com/virtualgeoff/sunclock Very cool!
- perilunar 4y agoThanks!
- wrycoder 4y agoI’m stoked by the Solar Dial face on my iWatch. Shows time of nautical and civil dawn and dusk, sun rise and set, length of day, and time before and after those various events.
- perilunar 4y agoThat's partly the inspiration for this. I don't have an iWatch but wanted something similar for my phone and desktop. Good article on the Solar Face: https://www.hodinkee.com/articles/the-eerie-beauty-of-the-apple-watch-solar-face-and-the-anatomy-of-nightfall https://www.hodinkee.com/articles/the-eerie-beauty-of-the-ap... I also wanted to do an elliptical horizon like astronomical clocks (https://en.wikipedia.org/wiki/Astronomical_clock https://en.wikipedia.org/wiki/Astronomical_clock), but did the "simplest thing that works" first.
- wrycoder 4y agoI love this kind of thing. I’m looking forward to your next version!
- cormullion 4y agoGreat work! There's a long history of similar dials listed at https://24hourtime.info/ https://24hourtime.info/ - perhaps yours can be added there!
- yababa_y 4y agothis is so good, i love it! some soft radial gradient roughly matching the sum would be pretty, but then the twilight edges are hard to distinguish…
- perilunar 4y agoThere's a gradient that you see briefly before the location loads, or for longer if you don't give location permission. I think it looks nicer than the end result, but you do need the edges between the periods to be clear.
- hulitu 4y ago"Location error: User denied Geolocation" There was a SunClock for the OpenLook toolkit. It worked (not like the above one) and it looked much better.
- perilunar 4y ago> User denied Geolocation The clock needs a location to calculate sunrise, sunset, and twilight times. You can set one manually in settings if you don't want to permit the browser to use the geolocation API.
- mxmilkiib 4y agohttps://play.google.com/store/apps/details?id=info.staticfree.android.twentyfourhour https://play.google.com/store/apps/details?id=info.staticfre... is a widget for Android and very neat (though it doesn't properly cache location) https://github.com/xxv/24hAnalogWidget https://github.com/xxv/24hAnalogWidget
- mxmilkiib 4y agoJust found https://play.google.com/store/apps/details?id=com.tdr.sunriseclock https://play.google.com/store/apps/details?id=com.tdr.sunris... which is better
- tagh 4y agoApologies if this is a dumb question, but why does it go anticlockwise?
- perilunar 4y agoNot a dumb question — it's one of the reasons I built this. It's because you are in the Southern Hemisphere. In the Southern Hemisphere the Sun is generally in the northern half of the sky at midday (although not always if north of the Tropic of Capricorn), and the sun appears to move anticlockwise across the sky. If you are facing North sunrise (East) is to your right and sunset (West) is to your left, and the hour hand of the clock pretty much tracks the position of the sun.
- tagh 4y agoThanks!
- skyde 4y agolove it! as a kid I never understood why we used 12 hours clock instead of 24 hours. 12hours is not a natural cycle
- yrro 4y agoWhere's night? Does 'twilight' include night? I thought that it was a separate phase before/after night? e.g., comparing the clock to the diagram at https://www.weather.gov/lmk/twilight-types https://www.weather.gov/lmk/twilight-types, night seems to be missing.
- vladharbuz 4y agoThe place I'm currently in is not currently experiencing night. This may also be true for you.
- erutuon 4y agoInteresting! That's similar to a clock that my brother and I made years ago (http://naturalclock.net http://naturalclock.net). Ours adds the altitude of the sun throughout the day and lets you select the location and fast forward and rewind time to see how the sun's path changes throughout the year. I came up with the basic concept and my brother drastically improved the graphics and added the map and retrieval of time zones. Unfortunately no documentation and no HTTPS. I don't know how accurate it is. As I recall we based the equations for the sun on a solar cell-related website. It's cool that the Sun Clock has the moon phases and that the sun (according to another comment) goes the correct way in the Southern Hemisphere. I kind of wanted to add the moon but hadn't thought about the position of the sun.