Cloud tree, explained · celworld

Cloud tree

.cel · 11 lines · 7 shapes · seed 1

Cloud tree is 5 shape lines that grow into 7 shapes, with 5 genes the seed draws.

tree@0's cloud form: a flared trunk forks into 2-3 boughs, each tipped with a puff, a bigger puff crowns the fork, and smaller puffs bud off the bough puffs

seed
L1

Cloud tree

asset
1asset tree_cloud "Cloud tree" ref=nature:tree:cloud complexity=2

The asset line names the model tree_cloud, titled Cloud tree. complexity=2 holds it to 30 shapes, 3,200 triangles and 2 draw calls; going past any of them is an error. ref=nature:tree:cloud pairs it with a hand-coded generator for side-by-side comparison.

tier
c2
shapes cap
30
triangles cap
3,200
seed
1
L4

H

let
4let H = 3.6..5.6

A gene, H: a value drawn between 3.6 and 5.6 for every seed. This seed picked 3.904. Every line that reads H follows it.

this seed
3.904
draws
from the seed
L5

TH

let
5let TH = H * (.38..0.46)

A gene, TH: worked out from a random draw: H * (.38..0.46). This seed picked 1.541.

this seed
1.541
draws
from the seed
L6

R0

let
6let R0 = .2..0.3

A gene, R0: a value drawn between 0.2 and 0.3 for every seed. This seed picked 0.287. Every line that reads R0 follows it.

this seed
0.287
draws
from the seed
L7

bark

let
7let bark = barkA:2|barkB|barkC

A gene, bark: a weighted pick from barkA (2 in 4), barkB or barkC. This seed picked barkB.

this seed
barkB
draws
from the seed
L8

fol

let
8let fol = leafA:3|leafB:2|leafC:2|leafD

A gene, fol: a weighted pick from leafA (3 in 8), leafB (2 in 8), leafC (2 in 8) or leafD. This seed picked leafD.

this seed
leafD
draws
from the seed
L10

trunk

lathe
10lathe trunk h=TH r=R0 prof=[0:1 1:.7] linear flare=.25..0.45 lean=(-.06..0.06, -.06..0.06)*TH color=bark~ segs=10 rings=8

A lathe, a profile spun round Y: pots, bodies, columns, domes, bells (base at the origin). It stands at the model's origin.

h
1.541
r
0.287
prof
[0:1 1:.7]
linear
yes
flare
0.421
lean
−0.092, −0.092
color
barkB
segs
10
rings
8
L11

bough

rod
11rod bough x2..3 on=trunk at=end+(0, -.04*TH, 0) ring=35 to=(.8..1.4, 1, 0)*(H*.22) r=(R0*.52, R0*.31) sides=8 color=trunk.color

A rod, a straight bar from the origin to to, flat ends: poles, legs, rails, spokes. It sits at the end of trunk, nudged by an offset. 2 copies spread evenly round trunk's Y axis.

copies
2
to
0.914, 0.859, 0
r
0.149, 0.089
sides
8
color
barkB
L12

crown

puff
12puff crown on=bough at=tip+(H*.04, H*.03, 0) r=(1, .85..0.95, .92..1)*H*(.17..0.23) color=fol*(.98..1.02) noise=.05..0.08

A puff, a foliage blob: ball with a darker underside band (color × .86) and wobble 0.06. It sits at the tip of bough, nudged by an offset. There is a set on each of the 2 bough copies, 2 in all.

copies
2
r
0.752, 0.667, 0.693
color
leafD
noise
0.067
L13

top

puff
13puff top on=trunk at=end+(0, H*.24, 0) r=(1, .85..0.95, .92..1)*H*(.2..0.26) color=fol*(.98..1.02) noise=.05..0.08

A puff, a foliage blob: ball with a darker underside band (color × .86) and wobble 0.06. It sits at the end of trunk, nudged by an offset.

r
0.893, 0.774, 0.848
color
leafD
noise
0.075
L14

bud

puff
14puff bud x0..2 on=crown ring=50 surf=(0, -10..80) upright lift=-H*.06 r=(1, .9, .96)*H*(.13..0.19) color=fol*(.98..1.02) noise=.05..0.08

A puff, a foliage blob: ball with a darker underside band (color × .86) and wobble 0.06. It sticks to the surface of crown at (0, -10..80) (azimuth, elevation). 1 copy spread evenly round crown's Y axis.

lift
-H*.06
r
0.734, 0.661, 0.705
color
leafD
noise
0.055