Circadian Clock
Description
A minimal 12h (from 6AM to 6PM) circadian clock that tracks time through the variation in light temperature and the position of the "sun" in the sky. The background colors are based on the color temperature of the light throughout the day. From 6PM to 6AM the clock displeys "See you at 6AM" on a blak background.
Design Process
I was always fascinated by how our body responds to external stimuli and how something invisible like light is fundamental for our wellbeing. I started by researching the light temperature in degree kelvin throughout the day and converting those values to RGB.
Once that was done, I used a combination of "if" and "if else" statements to change the background color and the position of the "sun" on the canvas. To achieve a smooth transition between the colors, I created the function "lerpBackColor," where I remapped the amt values of "lerpColor" to time and returned a new 'lerpColor" function where the amt values are time-dependent.
Reflection
I made my life difficult by tracking only the hours; this made it quite time-consuming to see if the clock was working. Another challenge I had was to make the "sun" move along an arc to simulate the rising and setting of the real sun. I ended up using "if" "if else" statements to move it across the sky, I'm not satisfied with this solution, and I will try to implement a better one shortly.