1asset campfire_ring "Campfire ring" complexity=4
2// like the cozy campfire, but a campground fire ring with no tripod: a fat ring of stones round
3// an ash bed, crossed logs, a tall layered flame with leaning tongues and glowing embers (seats
4// are separate log benches in a scene); the flames flicker, embers pulse, smoke and sparks rise
5let SR = .58..0.66
6let F = .95..1.15
7let stoneC = rockGrey:3|granite:2|rockCool|rockWarm
8let logC = barkB:2|walnut|redwood|barkC
9let hot = tangerine:3|tomato
10
11cyl ash h=.04 r=.8 round=.015 color=bedSoil segs=32 joint
12ball stone x10 on=ash ring=6 at=(SR, .08, 0) r=(.16, .11, .13) color=stoneC~ segs=10 rings=6
13
14// crossed logs and embers
15cyl log x4 on=ash ring=8 ring0=20 at=(.3, .05, 0) roll=sel(i, 62, 70, 66, 74) h=.66 r=.07 round=.02 color=logC cap=birch segs=10
16ball ember x5 on=ash ring=20 ring0=55 at=(.22, .07, 0) r=(.07, .05, .06) color=tomato ink=glow segs=8 rings=5 joint
17
18// flames: three nested teardrops and five leaning tongues
19lathe flameA on=ash at=(0, .1, 0) h=.62*F r=.24 prof=[0:.55 .25:1 .6:.7 1:.04] color=hot ink=glow segs=12 rings=8 joint
20lathe flameB on=ash at=(0, .12, 0) h=.48*F r=.18 prof=[0:.55 .25:1 .6:.7 1:.04] color=marigold ink=glow segs=12 rings=8 joint
21lathe flameC on=ash at=(0, .14, 0) h=.33*F r=.12 prof=[0:.55 .25:1 .6:.7 1:.04] color=lemon ink=glow segs=10 rings=7 joint
22lathe tongue x5 on=ash ring=15 at=(.16, .09, 0) roll=-22 h=.38*F r=.08 prof=[0:.55 .3:1 .65:.65 1:.04] color=sel(i, tomato, tangerine, marigold, tomato, tangerine) ink=glow segs=10 rings=6 joint
23
24fx smoke on=ash at=(-.1, .75, -.05) speed=.5 n=7 hz=.3
25fx sparkle on=ash at=(.08, .4, .1) speed=.7 gravity=-.2 spread=.14 n=8 hz=.7 size=.03 color=sunflower color2=tangerine
26
27anim flameA s sin amp=.08 hz=1.7
28anim flameB s sin amp=.1 hz=2.3 phase=.3
29anim flameC s sin amp=.11 hz=3.1 phase=.6
30anim tongue rz sin amp=10 hz=2.2 stagger=.25
31anim tongue s sin amp=.13 hz=2.7 stagger=.3
32anim ember s sin amp=.15 hz=.8 stagger=.2
33