Playground
From string_lights · Compiles in your browser · $0
CtrlShiftS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
asset string_lights "String lights" complexity=3// a 6 m span of festoon bulbs over the midway: two striped poles on weighted feet, a sagging wire// hung with a dozen glowing bulbs in a repeating colour run, and little pennants in between. Static// on purpose: the bulbs glow through their own colour, so a whole run of spans batches as one.let H = 3.4..3.6let poleC = cherry:2|cobalt|teal|grapelet poleB = cream:3|whitelet baseC = navy:2|plumlet metal = brass:3|silverlet bulbA = glow:3|sunflowerlet bulbB = pink:2|cherrylet bulbC = aqua:2|mint|skylet bulbD = tangerine:2|marigoldlet flagA = sunflower|pink|aqua|limelet flagB = cherry|cobalt|grape|teal// the poles on their feetcyl foot at=(3.3, 0, 0) mirror h=.24 r=.24 round=.06 color=baseC segs=12cyl pole on=foot at=(0, .24, 0) h=H-.24 r=.07 stripes=[poleC poleB] panels=4 bands=[.06:poleB .1:poleC .92:metal] color=poleC segs=10ball knob on=pole at=end r=.11 color=metal segs=10 rings=6ball cap on=pole at=(0, H-.55, 0) r=(.12, .06, .12) color=metal segs=10 rings=4// the wire: a gentle sag between the pole topstube wire pts=[-3.3,3.38,0 -2.2,3.03,0 -1.1,2.83,0 0,2.76,0 1.1,2.83,0 2.2,3.03,0 3.3,3.38,0] r=.025 smooth sides=5 color=baseC// a dozen bulbs hanging from it, sockets on topball bulb x12 at=(-2.86 + 5.72*t, 2.76 + .62*(-2.86 + 5.72*t)*(-2.86 + 5.72*t)/10.89 - .14, 0) r=(.1, .12, .1) color=sel(i - 4*floor(i/4), bulbA, bulbB, bulbC, bulbD) ink=glow segs=10 rings=6cyl socket on=bulb at=(0, .06, 0) h=.08 r=.045 color=baseC segs=6// pennants between the bulbsslab flag x11 at=(-2.6 + 5.2*t, 2.76 + .62*(-2.6 + 5.2*t)*(-2.6 + 5.2*t)/10.89 - .02, 0) pts=[-.13,0 .13,0 0,-.3] t=.04 round=.012 color=sel(i - 2*floor(i/2), flagA, flagB)
Clean: no issues on this seed.
Loading
seed
Shapes— / 45
Triangles— / 4,500
Draw calls— / 3