block by harrystevens 32966d31139ae61534d8d267e74f19f6

Self-Rotating Analog Clock

Full Screen

This block uses D3.js to draw a clock that tells the time by rotating itself. No need for hands! It also uses chroma.js to color the background according to the time of day.

I learned how to calculate the points around a circle’s circumference from this stackoverflow thread. Mathematicians call it the parametric equation for a circle.