Build a clock · Part 2 of 6
Tick marks
A pin that points to 12, and sixty turned copies of it for the ticks.
A pin that points to 12
A pin is a point with a direction. Pins.withOrientation creates
one at the center of the clock, pointing up, to 12.
Pins.rotateBy returns a copy of a pin, turned clockwise by an
angle. A full turn is 2π, so at(0.25) points to 3 and
at(0.5) to 6. The pin twelve itself never changes;
everything else on the clock is measured from it.
The ticks
Pins.moveForward moves a pin along its direction. For each
minute, the turned pin is moved to the rim (130 pixels) and to a point a
little inside it; the tick is the segment between the two.
The ticks never change, so they are computed once when they are created.
Two kinds of ticks
All ticks have the class tick. Every fifth tick also has the
class long, which makes it thicker.
