1asset dome_tent "Dome tent" complexity=3
2// a two-pole camping dome: a four-panel dome in two bright colours on a ground sheet, two poles
3// crossing over the top, a rain fly patch, an open door showing the dark inside with the flap
4// rolled up, stakes at the corners; the fabric breathes in the breeze
5let S = .9..1.08
6let flyA = tangerine:3|teal:2|cherry|cobalt|sunflower
7let flyB = cream:3|lemon|white
8let sheetC = navy:2|bottle|iron
9let poleC = silver:3|steel
10
11box sheet size=(2.7, .04, 2.7)*S round=.02 color=sheetC
12ball dome half at=(0, .04, 0) r=(1.15, 1.02, 1.15)*S stripes=[flyA flyB] panels=4 phase=45 color=flyA segs=40 rings=14 joint
13ball fly on=dome at=(0, .9*S, 0) r=(.55, .16, .55)*S color=flyA*.9 segs=20 rings=8
14
15// the two crossing poles, proud of the fabric
16tube poleA on=dome yaw=45 pts=[1.19,0,0 1.03,.52,0 .6,.9,0 0,1.06,0 -.6,.9,0 -1.03,.52,0 -1.19,0,0] scale=S r=.035 smooth sides=6 color=poleC
17tube poleB on=dome yaw=-45 pts=[1.19,0,0 1.03,.52,0 .6,.9,0 0,1.06,0 -.6,.9,0 -1.03,.52,0 -1.19,0,0] scale=S r=.035 smooth sides=6 color=poleC
18ball foot x4 ring ring0=45 at=(1.2*S, .04, 0) r=.06 color=poleC segs=8 rings=5
19
20// the door: a dark oval with the flap rolled up over it
21ball door on=dome at=(0, .4*S, .92*S) r=(.42, .44, .22)*S color=inkDark segs=18 rings=10
22cyl flap on=dome at=(-.42*S, .86*S, .78*S) rot=(0, 0, -90) h=.84*S r=.07 round=.03 color=flyB segs=10
23cone stake x4 ring ring0=45 at=(1.75*S, 0, 0) h=.2 r=.05 color=poleC segs=6
24
25anim dome s sin amp=.012 hz=.45
26