All examples By author By category About

HarryStevens

Self-Rotating Analog Clock

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.