Fox cub, explained · celworld

Fox cub

.cel · 22 lines · 17 shapes · 9 joints · seed 1

Fox cub is 11 shape lines that grow into 17 shapes, with 5 genes the seed draws, 5 motions on 4 joints.

a chibi fox cub: a round body on four short legs, a big head with a pointed muzzle and tall ears, a fat brush tail with a pale tip; it breathes and wags at rest, trots when a game says walk

seed

From the ground to each spot

Each part rides the one before it, so whoever sits at the end feels every motion at once.

Always on

State walk

L1

Fox cub

asset
1asset fox_cub "Fox cub" complexity=4

The asset line names the model fox_cub, titled Fox cub. complexity=4 holds it to 70 shapes, 6,000 triangles and 4 draw calls; going past any of them is an error.

tier
c4
shapes cap
70
triangles cap
6,000
seed
1
L4

S

let
4let S = .9..1.1

A gene, S: a value drawn between 0.9 and 1.1 for every seed. This seed picked 0.952. Every line that reads S follows it.

this seed
0.952
draws
from the seed
L5

coat

let
5let coat = tangerine:3|copper:2|honey|cream:.5

A gene, coat: a weighted pick from tangerine (3 in 6.5), copper (2 in 6.5), honey or cream (0.5 in 6.5). This seed picked honey.

this seed
honey
draws
from the seed
L6

pale

let
6let pale = cream:2|white

A gene, pale: a weighted pick from cream (2 in 3) or white. This seed picked white.

this seed
white
draws
from the seed
L7

sock

let
7let sock = walnut:2|redwood|iron

A gene, sock: a weighted pick from walnut (2 in 4), redwood or iron. This seed picked redwood.

this seed
redwood
draws
from the seed
L8

earS

let
8let earS = .9..1.15

A gene, earS: a value drawn between 0.9 and 1.15 for every seed. This seed picked 1.033. Every line that reads earS follows it.

this seed
1.033
draws
from the seed
L11

body

ball
11ball body at=(0, .27*S, 0) r=(.16, .15, .22)*S color=coat under=pale segs=20 rings=12 joint

A ball, an ellipsoid centred on the origin. It stands at the model's origin. It is a joint, and line 28 swells ±3% and line 32 bobs ±0.02 m: everything on it moves too.

body: the root bone, standing on four legs

r
0.152, 0.143, 0.209
color
honey
under
white
segs
20
rings
12
L12

leg

limb
12limb leg x2 on=body row=(0, 0, .25*S) at=(.085*S, -.02*S, 0) mirror len=.2*S r=(.052, .044)*S bands=[.6:sock] color=coat segs=10 joint

A limb, a capsule hanging DOWN from the origin (a joint at the top): arms, legs, necks (rot to aim). It rides body, at (.085*S, -.02*S, 0) in its frame. 4 copies in a centred row, (0, 0, .25*S) apart and a mirrored twin across the parent’s centre line. It is a joint, and line 31 tips ±30°: everything on it moves too.

copies
4
len
0.19
r
0.049, 0.042
bands
[.6:sock]
color
honey
segs
10
L15

head

ball
15ball head on=body at=(0, .16*S, .2*S) r=(.165, .145, .145)*S color=coat under=pale segs=20 rings=12 joint

A ball, an ellipsoid centred on the origin. It rides body, at (0, .16*S, .2*S) in its frame. It is a joint, and line 30 rocks ±5°: everything on it moves too.

head and muzzle

r
0.157, 0.138, 0.138
color
honey
under
white
segs
20
rings
12
L16

cheek

ball
16ball cheek on=head surf=(0, -26) upright lift=-.07*S r=(.11, .07, .08)*S color=pale segs=12 rings=7

A ball, an ellipsoid centred on the origin. It sticks to the surface of head at (0, -26) (azimuth, elevation).

lift
-.07*S
r
0.105, 0.067, 0.076
color
white
segs
12
rings
7
L17

muzzle

cone
17cone muzzle on=head surf=(0, -12) lift=-.03*S h=.11*S r=.06*S r2=.022*S color=coat segs=12

A cone, a cone (or frustum with r2), base at the origin. It sticks to the surface of head at (0, -12) (azimuth, elevation).

lift
-.03*S
h
0.105
r
0.057
r2
0.021
color
honey
segs
12
L18

nose

ball
18ball nose on=muzzle at=end r=.028*S color=inkDark ink=thin segs=8 rings=5

A ball, an ellipsoid centred on the origin. It sits at the end of muzzle. Its outline is half width.

r
0.027, 0.027, 0.027
color
inkDark
ink
thin
segs
8
rings
5
L19

look

face
19face look on=head eyes=round:3|happy mouth=cat spacing=30 eyeY=14 mouthY=-36 mouthW=.3 size=.2 detail=.6

A face, a house face (unlit, never inked) on the parent surface: eyes, mouth, blush, brows. It rides head, at its origin.

eyes
round
mouth
cat
spacing
30
eyeY
14
mouthY
−36
mouthW
0.3
size
0.2
detail
0.6
L20

ear

cone
20cone ear on=head surf=(34, 52) lift=-.03*S mirror h=.15*S*earS r=.065*S r2=.008*S depth=.55 color=coat segs=10

A cone, a cone (or frustum with r2), base at the origin. It sticks to the surface of head at (34, 52) (azimuth, elevation). 2 copies and a mirrored twin across the parent’s centre line.

copies
2
lift
-.03*S
h
0.148
r
0.062
r2
0.008
depth
0.55
color
honey
segs
10
L21

inner

cone
21cone inner on=ear at=(0, .01*S, .022*S) h=.11*S*earS r=.04*S r2=.006*S depth=.4 color=pale segs=8

A cone, a cone (or frustum with r2), base at the origin. It rides ear, at (0, .01*S, .022*S) in its frame. There is a set on each of the 2 ear copies, 2 in all.

copies
2
h
0.108
r
0.038
r2
0.006
depth
0.4
color
white
segs
8
L24

tail

ball
24ball tail x3 on=body at=(0, .02*S, -.2*S) chain=(0, .07*S, -.07*S) rot=(-28, 0, 0) scale=1.08 r=(.07, .07, .09)*S color=coat segs=12 rings=7 joint

A ball, an ellipsoid centred on the origin. It rides body, at (0, .02*S, -.2*S) in its frame. A chain of 3, each link riding the last. It is a joint, and line 29 sways ±25°: everything on it moves too.

the brush tail: three links that curl up, a pale tip

copies
3
rot
(-28, 0, 0)
scale
1.08
r
0.067, 0.067, 0.086
color
honey
segs
12
rings
7
L25

tip

ball
25ball tip on=tail at=(0, .1*S, -.06*S) r=(.07, .08, .08)*S color=pale segs=12 rings=7 if=i==2

A ball, an ellipsoid centred on the origin. It rides tail, at (0, .1*S, -.06*S) in its frame. Only when i==2.

copies
0
r
(.07, .08, .08)*S
segs
12
rings
7
L28

body swells ±3%

anim
28anim body breathe

body swells and shrinks by ±3%, once every 3.3 s (.3 Hz). This is the breathe preset: a gentle swell (bodies, chests). Everything on body goes with it.

idle: breathe, wag, look about; walk: a trot (diagonal pairs) with a bob

channel
s
wave
sin
rate
.3 Hz
amount
±3%
L29

tail sways ±25°

anim
29anim tail wag stagger=.12

tail (all 3 copies) turns side to side by ±25°, 2 times a second (2 Hz). This is the wag preset: a quick side-to-side (tails). Each copy runs 0.12 of a cycle behind the one before, so they move in turn. Everything on tail goes with it.

channel
ry
wave
sin
rate
2 Hz
amount
±25°
stagger
0.12
L30

head rocks ±5°

anim
30anim head sway amp=5 hz=.3

head rocks left and right by ±5°, once every 3.3 s (.3 Hz). This is the sway preset: a slow side-to-side lean (trees, signs, idle bodies). Everything on head goes with it.

channel
rz
wave
sin
rate
.3 Hz
amount
±5°
L31

leg tips ±30°

anim
31anim walk: leg gait amp=30 hz=1.8 stagger=.5

leg (all 4 copies) tips forward and back by ±30°, 1.8 times a second (1.8 Hz). This is the gait preset: legs or arms that swing in turn (mirror twins alternate). Each copy runs 0.5 of a cycle behind the one before, so they move in turn. The mirrored twin runs 0.5 of a cycle apart, so the pair alternate. It plays only while the model is in the walk state.

channel
rx
wave
sin
rate
1.8 Hz
amount
±30°
stagger
0.5
state
walk
L32

body bobs ±0.02 m

anim
32anim walk: body bob amp=.02 hz=3.6

body rises and falls by ±0.02 m, 3.6 times a second (3.6 Hz). This is the bob preset: up and down (floating things, riders). It plays only while the model is in the walk state. Everything on body goes with it.

channel
py
wave
sin
rate
3.6 Hz
amount
±0.02 m
state
walk