1asset carnival_lamp "Carnival lamp" complexity=3
2// an ornate fairground lamp post: a stepped fluted base, a striped post with collars, three curled
3// arms each holding a glowing globe in a brass cup, a crown of a fourth globe and a star finial
4let H = 3.3..3.7
5let postC = navy:3|bottle|plum
6let trimC = brass:3|copper
7let band = cherry:2|teal|grape
8let globeC = glow:4|sunflower
9
10// the base and the post
11lathe base h=.6 r=.26 prof=[0:1 .2:1 .2:.82 .5:.62 .5:.5 1:.36] linear stripes=[postC band] panels=8 color=postC segs=16
12cyl post on=base at=(0, .58, 0) h=H-.58 r=.075 r2=.06 stripes=[postC band] panels=6 color=postC segs=12
13torus collar on=post at=(0, .5, 0) R=.09 r=.035 color=trimC segs=14 sides=6
14torus collar2 on=post at=(0, H*.62-.58, 0) R=.08 r=.032 color=trimC segs=14 sides=6
15lathe capital on=post at=(0, H-.68, 0) h=.16 r=.07 prof=[0:1 .5:1.6 1:2.2] color=trimC segs=12
16
17// three curled arms with globes
18tube arm x3 on=post ring ring0=90 at=(0, H-.62, 0) pts=[0,0,0 .22,.04,0 .4,-.02,0 .5,.1,0 .52,.22,0] r=(.04, .03) smooth sides=6 color=postC
19lathe cup on=arm at=(.52, .2, 0) h=.1 r=.1 prof=[0:.5 1:1] color=trimC segs=10 rings=3
20ball globe on=cup at=(0, .2, 0) r=.17 color=globeC ink=glow segs=14 rings=9
21ball curl on=arm at=(.28, -.06, 0) r=.05 color=trimC segs=6 rings=4
22
23// the crown globe and the star
24lathe crowncup on=post at=end h=.12 r=.12 prof=[0:.5 1:1] color=trimC segs=12 rings=3
25ball crown on=crowncup at=(0, .22, 0) r=.2 color=globeC ink=glow segs=14 rings=9
26cyl spike on=crown at=(0, .17, 0) h=.2 r=.03 color=trimC segs=6
27slab star on=spike at=(0, .32, -.025) pts=[0,.17 .05,.06 .16,.05 .07,-.02 .11,-.14 0,-.07 -.11,-.14 -.07,-.02 -.16,.05 -.05,.06] t=.05 round=.015 color=trimC
28