1asset roomba_bot "Robot vacuum" complexity=3
2// a round robot vacuum with a personality: a low puck body with a rubber bumper band, a glossy domed
3// lid with a happy face on its front, a little antenna with a glowing tip, two side brushes that spin
4// and a dust bin stripe on the back; idle it hums and its light pulses, move makes it scurry
5let S = 1.1..1.2
6let shellC = white:3|mint|coral|sunflower|sky
7let bumpC = iron:2|inkDark|cobalt
8let tipC = glow:2|lime|aqua
9
10// the puck and its lid
11cyl puck at=(0, .015, 0) h=.08*S r=.19*S round=.03 bands=[.4:shellC] color=bumpC segs=32 joint
12ball lid on=puck at=(0, .075*S, 0) r=(.16, .075, .16)*S half color=shellC*1.05 segs=28 rings=10
13face look on=lid eyes=round mouth=smile eyeY=22 mouthY=4 size=.42 spacing=26 mouthW=.5 detail=.6
14box bin on=puck at=(0, .03*S, -.17*S) size=(.16, .045, .04)*S round=.015 color=tipC*.7
15
16// the antenna
17rod antenna on=lid at=(-.05*S, .06*S, -.05*S) to=(-.02, .12, -.03)*S r=.008 sides=5 color=bumpC
18ball tip on=antenna at=end r=.022*S color=tipC ink=glow segs=8 rings=5 joint
19
20// side brushes under the front edge
21cyl hub x2 on=puck at=(.12*S, -.005, .11*S) row=(-.24*S, 0, 0) h=.012 r=.02 color=bumpC segs=8 joint
22box bristle x3 on=hub ring at=(.05, .006+i*.003, 0) size=(.07, .01, .015) round=.004 color=sunflower
23
24// wheels peeking out of the sides
25wheel wheel at=(.18*S, .035, 0) mirror r=.035*S w=.03 hub=bumpC tyre=inkDark
26
27// idle: hum and a pulsing tip; move: scurry
28anim tip s sin amp=.3 hz=.8
29anim puck py sin amp=.004 hz=2.2
30anim hub ry spin hz=.6
31anim move: hub ry spin hz=4
32anim move: puck rz sin amp=2 hz=3
33anim move: puck py bounce amp=.008 hz=6
34