1asset ticket_booth "Ticket booth" complexity=4
2// a little striped ticket booth: a rounded-square kiosk on a plinth, a round lit window with a brass
3// frame and a counter shelf, a ticket-shaped sign with a star, a striped onion dome ringed with bulbs
4// and a pennant on top
5let S = .95..1.05
6let stA = cherry:3|cobalt|teal|grape
7let stB = cream:3|white
8let trim = navy:2|plum|bottle
9let metal = brass:3|copper
10let signC = sunflower:2|lemon|pink
11let bulbC = glow:3|sunflower
12
13// the plinth and the kiosk
14box plinth size=(1.9, .18, 1.9)*S round=.05 color=trim
15cyl kiosk on=plinth at=(0, .18*S, 0) h=2.05*S r=.86*S sq=4.5 stripes=[stA stB] panels=12 phase=15 bands=[.08:trim .12:stA] color=stA segs=32
16box sill on=kiosk at=(0, 2.0*S, 0) size=(1.86, .14, 1.86)*S round=.06 color=metal
17
18// the round window, lit from inside, and the counter
19cyl pane on=kiosk at=(0, 1.32*S, .78*S) rot=(90, 0, 0) h=.14*S r=.38*S color=bulbC ink=glow segs=24
20torus frame on=pane at=(0, .14*S, 0) R=.4*S r=.065*S color=metal segs=28 sides=8
21box bar on=pane at=(0, .07*S, 0) size=(.06, .1, .7)*S round=.02 color=metal
22box counter on=kiosk at=(0, .86*S, .9*S) size=(1.1, .08, .34)*S round=.03 color=metal
23box bracket on=counter at=(.42*S, -.2*S, -.08*S) mirror size=(.06, .2, .14)*S round=.02 color=metal
24
25// the ticket sign: a notched board with a star
26slab sign on=sill at=(0, .1*S, .94*S) pts=[-.62,0 .62,0 .62,.16 .52,.24 .62,.32 .62,.48 -.62,.48 -.62,.32 -.52,.24 -.62,.16] scale=S t=.08*S round=.03 color=signC edge=stA
27ball star on=sign at=(0, .24*S, .07*S) r=(.11, .11, .04)*S color=stA segs=10 rings=5
28
29// the dome, its bulbs and the pennant
30lathe dome on=sill at=(0, .12*S, 0) h=1.05*S r=.98*S prof=[0:.9 .25:.94 .55:.66 .85:.2 1:.04] stripes=[stA stB] panels=8 phase=22.5 color=stB segs=32 rings=12
31ball bulb x10 on=sill ring at=(.98*S, .08*S, 0) r=.08*S color=bulbC ink=glow segs=8 rings=5
32cyl spike on=dome at=(0, 1.0*S, 0) h=.42*S r=.035*S color=metal segs=6
33ball knob on=spike at=(0, .1*S, 0) r=.07*S color=metal segs=8 rings=5
34slab pennant on=spike at=(0, .4*S, 0) pts=[0,0 .42,-.09 0,-.2] scale=S t=.03 round=.01 color=signC
35