1asset flower_patch "Swaying flowers" complexity=3
2// a little patch of five round cartoon flowers on bendy stems, each a yellow or white heart ringed
3// by five ball petals, with a pair of leaves at the foot; the stems sway out of step in the breeze.
4// Each seed picks one bright garden colour.
5let S = .9..1.1
6let mixA = flowerRed:2|flowerPink:2|flowerYellow|flowerPurple|flowerBlue
7
8let stemC = stem
9let leafCol = leafB:2|leafA
10
11ball tuft at=(0, .05, 0) r=(.26, .07, .22)*S color=leafCol segs=12 rings=6
12cyl stalk x5 on=tuft ring=14 at=(.15*S, 0, 0) rot=(0, 0, -8..8) h=(.3..0.46)*S r=.018*S color=stemC segs=6 joint
13ball heart on=stalk at=end r=.045*S color=sel(i, daisyEye, flowerWhite, daisyEye, flowerWhite, daisyEye) segs=8 rings=5
14ball petal x5 on=heart ring at=(.055*S, 0, 0) r=(.045, .025, .04)*S color=mixA segs=8 rings=5
15ball leaf on=stalk at=(.04*S, .06*S, 0) roll=-70 r=(.06, .016, .03)*S color=leafCol segs=8 rings=4
16
17anim stalk rz sin amp=7 hz=.55 stagger=.23
18anim stalk rx sin amp=4 hz=.4 stagger=.31
19