1asset wall_clock "Wall clock" complexity=2
2// a round office wall clock: a fat coloured rim, a cream face with twelve hour marks (the quarters
3// bigger), an hour hand, a minute hand and a red second hand that sweep round, a centre cap; the back
4// is flat at z = 0, hang it on a wall with lift
5let rimC = cherry:2|cobalt:2|sunflower|teal|iron|walnut
6let faceC = cream:2|white
7let handC = inkDark:3|navy
8
9// rim and face, standing up on their edge
10torus rim at=(0, .26, .05) rot=(90, 0, 0) R=.22 r=.045 color=rimC segs=40 sides=10
11cyl face at=(0, .26, 0) rot=(90, 0, 0) h=.06 r=.225 color=faceC segs=36
12box mark x12 on=face ring at=(.18, .06, 0) size=(sel(i, .05, .028, .028, .05, .028, .028, .05, .028, .028, .05, .028, .028), .01, .022) round=.006 color=handC ink=none
13
14// the hands ride a pin whose axis points into the wall, so a forward spin turns them clockwise
15cyl pin on=face at=(0, .1, 0) rot=(180, 0, 0) h=.03 r=.012 color=handC segs=8
16cyl hourhub on=pin at=(0, -.026, 0) yaw=-130 h=.004 r=.018 color=handC segs=10 joint
17box hourhand on=hourhub at=(0, -.006, .05) size=(.024, .006, .12) round=.008 color=handC ink=none
18cyl minhub on=pin at=(0, -.034, 0) yaw=-250 h=.004 r=.016 color=handC segs=10 joint
19box minhand on=minhub at=(0, -.006, .075) size=(.016, .006, .16) round=.006 color=handC ink=none
20cyl sechub on=pin at=(0, -.042, 0) yaw=-60 h=.004 r=.012 color=cherry segs=10 joint
21box sechand on=sechub at=(0, -.006, .06) size=(.008, .006, .19) round=.003 color=cherry ink=none
22ball cap on=pin at=(0, -.05, 0) r=.018 color=cherry segs=8 rings=5
23
24anim hourhub ry spin hz=.002
25anim minhub ry spin hz=.02
26anim sechub ry spin hz=.1
27