Analog Clock

Drawing a clock may seem simple at first, but there are a few points of attention. First off, the unit circle starts at 3 o'clock and not at 12, and runs counterclockwise. Also the origin of the canvas is at the upper left corner and not in the center.

More importantly, the hands cannot just be translated from time of day into degrees, because they must also reflect the progression of the other hands; this is particularly true for the hour hand. It doesn't just indicate the current hour, but also the number of minutes that have past since. For instance, at half past 2, the hour hand should not point at 2, but at halfway between 2 and 3.

I could have added markings, but I didn't bother because it's more of the same, and I kind of like the minimalistic look. It's a clock for advanced users.

View code on Github