VELLUM
vellum.dmt · 120 BPM · 28 s · 960×600
model-made2dfeedback
notes
An illuminated manuscript that writes itself in light: four folios, modal dulcimer and reed music, ink geometry and gilded feedback.
| music | D minor: frame drum, snap, hats, bass, dulcimer, reed, pad, chimes with channel/master delay and reverb |
|---|---|
| visual | four timeline-cut illuminated-manuscript folios: parchment grain, botanical rosettes, an armillary chart, a vermilion initial and rubricated text, a scrolling colophon; kifs filigree, glyphs, feedback; scale=2 dither=1 |
| file | vellum.dmt |
|---|---|
| duration | 0:28 |
| video | 960×600 · 30 fps · h264 + audio · 8.8 MB |
| song | 120 BPM · speed 6 · rpb 4 · 6 channels |
| loop | 0 |
| render | scale 2 · dither on · master 0.58 |
| uniforms | kickE snapE pluckE leadE turn drift gild reveal |
| model | Kimi K3.1 Pro |
| collection | Written by the models |
| tags | model-made2dfeedback |
| source | 496 lines · 19 KB · download |
anatomy
17VM programs
7patterns
3palettes
5timeline events
10text / sample / texture
496source lines
8inst
2chan
1master
1frame
4pixel
1post
5fn
line composition
pixel 41%pattern 27%inst 11%palette 5%fn 5%frame 2%text 2%post 2%chan 2%timeline 2%master 2%title 0%song 0%order 0%pan 0%uniform 0%
play order
00112233445566
order list · 14 entries
palettes
parchment6 keys · lines 26–33
gilt6 keys · lines 34–41
midnight5 keys · lines 42–48
timeline
| at | event | value | source | |
|---|---|---|---|---|
| 0:00 | scene | 0 | L51 | |
| 0:04 | scene | 1 | L52 | |
| 0:12 | scene | 2 | L53 | |
| 0:16 | scene | 0 | L54 | |
| 0:20 | scene | 3 | L55 |
Event times are derived from the order list, pattern lengths, BPM and RPB.
resources
| kind | name | info | value |
|---|---|---|---|
| text | title | 6 | VELLUM |
| text | subtitle | 21 | THE LIVING MANUSCRIPT |
| text | orbis | 5 | ORBIS |
| text | initial | 1 | V |
| text | line1 | 35 | INK REMEMBERS WHAT THE HAND FORGETS |
| text | line2 | 34 | THE PAGE DREAMS IN GOLD AND STATIC |
| text | line3 | 26 | EVERY MARK A SMALL MACHINE |
| text | line4 | 22 | EVERY SILENCE A MARGIN |
| text | line5 | 32 | TURN THE LEAF. FOLLOW THE LIGHT. |
| text | colophon | 99 | WRITTEN IN LIGHT ... BOUND IN SOUND ... FOLIO VII ... THE HAND IS QUIET BUT THE PAGE IS NOT ... |
source
1# @description An illuminated manuscript that writes itself in light: four folios, modal dulcimer and reed music, ink geometry and gilded feedback.
2# @tags feedback, 2d
3# @model Kimi K3.1 Pro
4# @collection Written by the models
5# @music D minor: frame drum, snap, hats, bass, dulcimer, reed, pad, chimes with channel/master delay and reverb
6# @visual four timeline-cut illuminated-manuscript folios: parchment grain, botanical rosettes, an armillary chart, a vermilion initial and rubricated text, a scrolling colophon; kifs filigree, glyphs, feedback; scale=2 dither=1
7# @duration 28
8# vellum.dmt - an illuminated manuscript that writes itself in light.
9# Four folios, modal dulcimer/reed music, ink geometry and gilded feedback.
10title VELLUM
11song bpm=120 speed=6 rpb=4 channels=6 loop=0 volume=0.58 scale=2 dither=1
12order 0 0 1 1 2 2 3 3 4 4 5 5 6 6
13pan 0.50 0.54 0.48 0.32 0.68 0.50
15text title "VELLUM"
16text subtitle "THE LIVING MANUSCRIPT"
17text orbis "ORBIS"
18text initial "V"
19text line1 "INK REMEMBERS WHAT THE HAND FORGETS"
20text line2 "THE PAGE DREAMS IN GOLD AND STATIC"
21text line3 "EVERY MARK A SMALL MACHINE"
22text line4 "EVERY SILENCE A MARGIN"
23text line5 "TURN THE LEAF. FOLLOW THE LIGHT."
24text colophon " WRITTEN IN LIGHT ... BOUND IN SOUND ... FOLIO VII ... THE HAND IS QUIET BUT THE PAGE IS NOT ... "
26palette parchment {
27 0.00 0.055 0.018 0.025
28 0.22 0.190 0.075 0.055
29 0.46 0.480 0.270 0.130
30 0.70 0.790 0.590 0.310
31 0.88 0.940 0.800 0.520
32 1.00 1.000 0.920 0.700
33}
34palette gilt {
35 0.00 0.120 0.015 0.020
36 0.28 0.400 0.055 0.025
37 0.52 0.950 0.330 0.040
38 0.72 1.000 0.780 0.220
39 0.88 1.000 0.970 0.660
40 1.00 0.120 0.015 0.020
41}
42palette midnight {
43 0.00 0.003 0.006 0.018
44 0.30 0.012 0.025 0.065
45 0.55 0.035 0.100 0.135
46 0.76 0.120 0.250 0.250
47 1.00 0.420 0.520 0.390
48}
50timeline {
51 0:00 scene=0
52 2:00 scene=1
53 6:00 scene=2
54 8:00 scene=0
55 10:00 scene=3
56}
58# --------------------------------------------------------------------- sound
59inst drum {
60 f = 52 + 290 * exp(-t * 30)
61 $p = $p + f / sr
62 skin = sin($p * tau) + sin($p * tau * 1.51) * 0.22 * exp(-t * 18)
63 fingers = lp(noise(), 1100) * exp(-t * 55) * 0.32
64 out(dist(skin * exp(-t * 7.5) * 1.8 + fingers, 1.35) * 0.72)
65}
66inst snap {
67 n = svf(noise(), 1450 + 2800 * exp(-t * 24), 0.32)
68 wood = sin(tau * 210 * t) * exp(-t * 35)
69 out((r2 * 0.78 + n * 0.20 + wood * 0.25) * exp(-t * 11) * 0.46)
70}
71inst hat {
72 out(hp(noise(), 7600) * exp(-t * (42 + 70 * (1 - vel))) * 0.19)
73}
74inst bass {
75 e = env(0.006, 0.20, 0.38, 0.12)
76 s = tri(ph) * 0.75 + bsaw(ph, freq) * 0.28
77 s = svf(s, 150 + 850 * e + p0 * 400, 0.24)
78 out(s * e * 0.48)
79}
80inst dulcimer nna=continue {
81 attack = min(t * 650, 1)
82 e = attack * exp(-t * 3.4)
83 m = sin(ph * tau * 2.005) * 2.1 * exp(-t * 5.5)
84 a = sin(ph * tau + m)
85 b = sin(ph * tau * 3.01 + m * 0.25) * 0.28
86 c = sin(ph * tau * 0.501) * 0.16
87 out((a + b + c) * e * 0.30)
88}
89inst reed nna=continue {
90 e = env(0.025, 0.20, 0.48, 0.24)
91 vib = 1 + 0.004 * sin(t * 6.2) * min(t * 3, 1)
92 $p = $p + freq * vib / sr
93 s = bsaw($p, freq) * 0.55 + bsqr($p, 0.38, freq) * 0.45
94 s = svf(s, 650 + 2100 * e + 300 * sin(t * 2.1), 0.30)
95 out(s * e * 0.25)
96}
97inst pad nna=continue {
98 e = env(0.22, 0.55, 0.58, 0.70)
99 s = usaw(freq, 0.14) * 0.55 + sin(ph * tau * 0.5) * 0.45
100 s = svf(s, 330 + 520 * e + 130 * sin(t * 0.7), 0.22)
101 out(s * e * 0.19)
102}
103inst chime nna=continue {
104 e = min(t * 900, 1) * exp(-t * 2.2)
105 m = sin(ph * tau * 3.97) * 2.8 * exp(-t * 2.8)
106 out((sin(ph * tau + m) + sin(ph * tau * 2.006) * 0.24) * e * 0.20)
107}
109chan 3 {
110 d = dly(x, 0.375, 0.38)
111 out(x + d * 0.27)
112}
113chan 4 {
114 w = verb(x, 0.72, 0.48)
115 out(x * 0.86 + w * 0.24)
116}
117master {
118 dl = dly(l, 0.375, 0.30)
119 dr = dly(r, 0.500, 0.34)
120 vl = verb(l + dr * 0.18, 0.73, 0.52)
121 vr = verb(r + dl * 0.18, 0.73, 0.52)
122 out(dist(l + dr * 0.20 + vl * 0.13, 1.20), dist(r + dl * 0.20 + vr * 0.13, 1.20))
123}
125# Channels: 0 drum, 1 snap/hat, 2 bass, 3 dulcimer/chime, 4 reed, 5 pad.
126# D minor, two chords per bar. Every pattern is a complete bar; order gives 14.
127pattern 0 rows=16 {
128 00: . | . | D-1 4 28 S30 | D-4 5 28 | . | D-3 7 30
129 01: . | . | . | . | . | .
130 02: . | . | . | A-4 5 22 | . | .
131 03: . | . | . | . | . | .
132 04: . | C-6 3 0C | D-2 4 24 | F-4 5 25 | . | .
133 05: . | . | . | . | . | .
134 06: . | . | . | E-4 5 21 | . | .
135 07: . | C-6 3 0A | . | . | . | .
136 08: . | . | A-1 4 28 S60 | A-4 5 27 | . | A-2 7 28
137 09: . | . | . | . | . | .
138 10: . | C-6 3 0D | . | F-4 5 22 | . | .
139 11: . | . | A-1 4 22 | . | . | .
140 12: . | . | . | C-5 5 25 | . | .
141 13: . | C-6 3 09 | . | . | . | .
142 14: . | . | D-2 4 23 | A-4 5 23 | . | .
143 15: . | . | . | D-5 8 18 | . | .
144}
145pattern 1 rows=16 {
146 00: C-2 1 38 | C-6 3 13 | D-1 4 38 S40 | D-4 5 30 | . | D-3 7 31
147 01: . | . | . | A-4 5 24 | . | .
148 02: . | C-6 3 1B | D-1 4 28 | F-4 5 26 | . | .
149 03: . | . | . | A-4 5 22 | . | .
150 04: C-2 1 32 | D-5 2 32 | . | C-5 5 28 | D-5 6 24 | .
151 05: . | C-6 3 10 | D-2 4 25 | A-4 5 22 | . | .
152 06: . | C-6 3 1B | D-1 4 30 | F-4 5 26 | . | .
153 07: . | . | . | E-4 5 23 | . | .
154 08: C-2 1 38 | C-6 3 13 | A#1 4 37 S70 | A#4 5 29 | . | A#2 7 30
155 09: . | . | . | F-4 5 23 | . | .
156 10: . | C-6 3 1C | A#1 4 27 | D-4 5 26 | . | .
157 11: . | . | . | F-4 5 22 | . | .
158 12: C-2 1 32 | D-5 2 34 | . | A-4 5 28 | F-5 6 23 | .
159 13: . | C-6 3 10 | A#1 4 24 | F-4 5 22 | . | .
160 14: C-2 1 25 | C-6 3 18 | C-2 4 28 | D-4 5 25 | . | .
161 15: . | D-5 2 20 | . | A-4 8 20 | . | .
162}
163pattern 2 rows=16 {
164 00: C-2 1 39 | C-6 3 13 | F-1 4 38 S50 | F-4 5 30 | F-5 6 24 | F-3 7 31
165 01: . | . | . | A-4 5 23 | . | .
166 02: . | C-6 3 1C | F-1 4 27 | C-5 5 27 | . | .
167 03: . | . | . | A-4 5 22 | . | .
168 04: C-2 1 33 | D-5 2 34 | . | F-5 5 27 | A-5 6 23 | .
169 05: . | C-6 3 10 | F-2 4 25 | C-5 5 22 | . | .
170 06: C-2 1 25 | C-6 3 1B | F-1 4 29 | A-4 5 26 | . | .
171 07: . | . | . | G-4 5 22 | . | .
172 08: C-2 1 38 | C-6 3 13 | C-2 4 37 S80 | C-5 5 29 | . | C-3 7 30
173 09: . | . | . | E-5 5 23 | . | .
174 10: . | C-6 3 1C | C-2 4 27 | G-4 5 26 | G-5 6 23 | .
175 11: . | . | . | E-4 5 22 | . | .
176 12: C-2 1 33 | D-5 2 34 | . | C-5 5 28 | E-5 6 24 | .
177 13: . | C-6 3 10 | C-2 4 24 | G-4 5 22 | . | .
178 14: . | C-6 3 18 | G-1 4 28 | E-4 5 25 | . | .
179 15: . | D-5 2 21 | . | D-5 8 20 | D-5 6 22 | .
180}
181pattern 3 rows=16 {
182 00: C-2 1 36 | C-6 3 11 | G-1 4 35 S30 | G-4 5 28 | . | G-2 7 30
183 01: . | . | . | D-5 5 22 | . | .
184 02: . | C-6 3 19 | G-1 4 25 | A#4 5 25 | . | .
185 03: . | . | . | D-4 5 22 | . | .
186 04: C-2 1 30 | D-5 2 30 | . | G-4 5 26 | D-5 6 22 | .
187 05: . | C-6 3 0E | G-2 4 23 | A#4 5 21 | . | .
188 06: . | C-6 3 18 | G-1 4 28 | D-5 5 25 | . | .
189 07: . | . | . | A-4 5 22 | . | .
190 08: C-2 1 36 | C-6 3 12 | A-1 4 36 S90 | A-4 5 29 | . | A-2 7 30
191 09: . | . | . | E-5 5 23 | . | .
192 10: . | C-6 3 1A | A-1 4 26 | C#5 5 26 | . | .
193 11: . | . | . | E-4 5 22 | . | .
194 12: C-2 1 31 | D-5 2 32 | . | A-4 5 27 | E-5 6 24 | .
195 13: . | C-6 3 10 | A-1 4 24 | C#5 5 22 | . | .
196 14: C-2 1 28 | C-6 3 18 | E-2 4 28 | E-5 5 25 | . | .
197 15: C-2 1 24 | D-5 2 25 E93 | . | A-5 8 20 | . | .
198}
199pattern 4 rows=16 {
200 00: C-2 1 40 | C-6 3 14 | D-1 4 40 S60 | D-5 5 31 | D-5 6 25 | D-3 7 32
201 01: . | C-6 3 0D | . | A-4 5 23 | . | .
202 02: . | C-6 3 1D | D-1 4 29 | F-5 5 27 | . | .
203 03: . | . | . | E-5 5 23 | . | .
204 04: C-2 1 34 | D-5 2 35 | D-2 4 26 | D-5 5 29 | A-5 6 25 | .
205 05: . | C-6 3 11 | . | C-5 5 22 | . | .
206 06: C-2 1 27 | C-6 3 1C | D-1 4 31 | A-4 5 27 | . | .
207 07: . | D-5 2 18 | . | F-5 8 19 | . | .
208 08: C-2 1 39 | C-6 3 14 | A#1 4 39 S80 | A#4 5 30 | . | A#2 7 31
209 09: . | C-6 3 0D | . | D-5 5 23 | . | .
210 10: . | C-6 3 1D | A#1 4 28 | F-5 5 27 | F-5 6 24 | .
211 11: . | . | . | D-5 5 22 | . | .
212 12: C-2 1 34 | D-5 2 36 | A#1 4 25 | A-4 5 29 | A-5 6 25 | .
213 13: . | C-6 3 11 | C-2 4 25 | F-4 5 22 | . | .
214 14: C-2 1 29 | C-6 3 19 | D-2 4 29 | D-5 5 26 | . | .
215 15: C-2 1 25 | D-5 2 24 | . | F-5 8 21 | C-6 6 21 | .
216}
217pattern 5 rows=16 {
218 00: C-2 1 40 | C-6 3 14 | F-1 4 40 S70 | F-5 5 31 | F-5 6 25 | F-3 7 32
219 01: . | C-6 3 0D | . | C-5 5 23 | . | .
220 02: . | C-6 3 1D | F-1 4 29 | A-5 5 27 | . | .
221 03: . | . | . | G-5 5 23 | . | .
222 04: C-2 1 34 | D-5 2 35 | F-2 4 26 | F-5 5 29 | A-5 6 25 | .
223 05: . | C-6 3 11 | . | E-5 5 22 | . | .
224 06: C-2 1 27 | C-6 3 1C | F-1 4 31 | C-5 5 27 | . | .
225 07: . | D-5 2 19 | . | A-5 8 20 | . | .
226 08: C-2 1 39 | C-6 3 14 | C-2 4 39 SA0 | C-5 5 30 | G-5 6 24 | C-3 7 31
227 09: . | C-6 3 0D | . | E-5 5 23 | . | .
228 10: . | C-6 3 1D | C-2 4 28 | G-5 5 27 | . | .
229 11: . | . | . | E-5 5 22 | . | .
230 12: C-2 1 34 | D-5 2 36 | G-1 4 26 | E-5 5 29 | C-6 6 25 | .
231 13: . | C-6 3 11 | C-2 4 25 | G-4 5 22 | . | .
232 14: C-2 1 29 | C-6 3 19 | D-2 4 29 | D-5 5 26 | . | .
233 15: C-2 1 26 | D-5 2 26 E93 | A-1 4 27 | E-5 8 21 | D-6 6 22 | .
234}
235pattern 6 rows=16 {
236 00: C-2 1 40 | C-6 3 15 | D-1 4 40 S90 | D-5 5 32 | D-5 6 27 | D-3 7 33
237 01: . | C-6 3 0E | . | A-5 5 24 | . | .
238 02: . | C-6 3 1E | D-1 4 30 | F-5 5 28 | . | .
239 03: . | C-6 3 0C | . | E-5 5 23 | . | .
240 04: C-2 1 35 | D-5 2 37 | D-2 4 27 | D-6 5 30 | A-5 6 26 | .
241 05: . | C-6 3 12 | . | C-6 5 23 | . | .
242 06: C-2 1 28 | C-6 3 1D | D-1 4 32 | A-5 5 28 | . | .
243 07: . | D-5 2 22 | . | F-6 8 21 | . | .
244 08: C-2 1 40 | C-6 3 15 | D-1 4 40 SB0 | D-5 5 31 | F-5 6 25 | D-3 7 32
245 09: . | C-6 3 0E | . | A-4 5 24 | . | .
246 10: . | C-6 3 1E | D-2 4 29 | F-5 5 28 | A-5 6 25 | .
247 11: . | C-6 3 0C | A-1 4 25 | E-5 5 23 | . | .
248 12: C-2 1 36 | D-5 2 38 | D-1 4 29 | D-5 5 30 | D-6 6 26 | .
249 13: C-2 1 27 | C-6 3 12 | D-2 4 26 | A-4 5 23 | . | .
250 14: C-2 1 31 | C-6 3 1D | A-1 4 29 | C-5 5 27 | . | .
251 15: C-2 1 38 | D-5 2 30 | D-1 4 36 | D-5 8 30 | A-5 6 25 | D-4 8 24
252}
254# --------------------------------------------------------------------- drawing
255fn textline(s, px, py, sz) {
256 cx = (u - px) / sz
257 cy = (py - v) / sz
258 i = floor(cx)
259 return glyph(str(s, i), fract(cx), fract(cy)) * step(0, cx) * step(cx, strlen(s)) * step(0, cy) * step(cy, 1)
260}
261fn centred(s, py, sz) {
262 return textline(s, -strlen(s) * sz * 0.5, py, sz)
263}
264fn ring(px, py, rr, thick) {
265 return exp(-abs(len(px, py) - rr) / thick)
266}
267fn boxline(px, py, hx, hy, thick) {
268 q = max(abs(px) / hx, abs(py) / hy)
269 return exp(-abs(q - 1) / thick)
270}
271fn scroller(s, py, sz, speed) {
272 per = (strlen(s) + 10) * sz
273 px = aspect - fract(time * speed / per) * per
274 return max(textline(s, px, py, sz), textline(s, px + per, py, sz))
275}
277uniform kickE snapE pluckE leadE turn drift gild reveal
278frame {
279 kickE = exp(-trig(0) * 8)
280 snapE = exp(-trig(1) * 12) * (1 - step(80, note(1)))
281 pluckE = exp(-trig(3) * 5)
282 leadE = cenv(4)
283 turn = beat * 0.055 + 0.12 * sin(beat * 0.11)
284 drift = sin(beat * 0.09) * 0.5 + 0.5
285 gild = 0.55 + 0.25 * sin(beat * 0.17) + pluckE * 0.20
286 reveal = smooth(0, 2, time)
287 select(evt(scene))
288}
290# Folio I: deckled parchment, manuscript type, a living botanical rosette.
291pixel folio {
292 px = u + 0.012 * sin(v * 4 + beat * 0.12)
293 py = v + 0.009 * sin(u * 5 - beat * 0.09)
294 grain = fbm(px * 5 + 17, py * 5 - 9, 4)
295 stain = fbm(px * 1.25 - 3, py * 1.25 + 8, 3)
296 fibre = sin(py * 530 + grain * 12) * 0.018
297 pal(parchment, 0.53 + grain * 0.25 + stain * 0.16 + fibre)
298 cmul(0.82 + reveal * 0.18)
299 edge = max(abs(u) / aspect, abs(v))
300 cmul(1 - 0.58 * smooth(0.69, 1.0, edge))
302 border = boxline(px, py, 1.46, 0.86, 0.010)
303 border2 = boxline(px, py, 1.41, 0.81, 0.006)
304 corners = ring(abs(px) - 1.42, abs(py) - 0.82, 0.055, 0.009)
305 ink = max(border * 0.64, max(border2 * 0.42, corners * 0.75))
306 cmul(1 - ink * 0.72)
308 # The rosette is drawn as polar equations rather than a texture.
309 rx = px
310 ry = py + 0.055
311 rad = polar(rx, ry)
312 ang = r1 + turn * 0.32
313 rose = 0.205 + 0.065 * cos(ang * 8) + 0.018 * cos(ang * 16 - beat * 0.18)
314 petals = exp(-abs(rad - rose) * 105)
315 r1ing = ring(rx, ry, 0.335, 0.0045)
316 r2ing = ring(rx, ry, 0.305, 0.0030)
317 spokes = pow(abs(cos(ang * 6)), 52) * smooth(0.09, 0.14, rad) * (1 - smooth(0.28, 0.32, rad))
318 heart = ring(rx, ry, 0.073 + kickE * 0.012, 0.009)
319 gold = max(petals, max(r1ing * 0.85, max(r2ing * 0.65, max(spokes * 0.7, heart))))
320 cadd(gold * (0.52 + gild * 0.38), gold * (0.24 + gild * 0.32), gold * 0.055)
321 cmul(1 - exp(-abs(rad - 0.245) * 130) * 0.35)
323 # Mirrored stems and leaves occupy the margins.
324 mx = abs(px)
325 stem = exp(-abs(mx - (1.20 + 0.045 * sin(py * 10 + turn))) * 95) * step(abs(py), 0.66)
326 leafwave = abs(sin(py * 18 + turn * 2))
327 leaves = exp(-abs(mx - (1.15 + leafwave * 0.11)) * 65) * pow(leafwave, 5) * step(abs(py), 0.62)
328 cmul(1 - stem * 0.46)
329 cadd(leaves * 0.19, leaves * 0.28, leaves * 0.075)
331 ttl = centred(title, 0.62, 0.190)
332 shadow = centred(title, 0.608, 0.190)
333 cmul(1 - shadow * 0.52)
334 cadd(ttl * (0.74 + pluckE * 0.25), ttl * (0.43 + gild * 0.25), ttl * 0.095)
335 sub = centred(subtitle, 0.395, 0.048)
336 cmul(1 - sub * 0.74)
337 l1 = centred(line1, -0.485, 0.044)
338 l2 = centred(line2, -0.600, 0.044)
339 cmul(1 - max(l1, l2) * 0.76)
340 seal = ring(px, py + 0.72, 0.024 + pluckE * 0.012, 0.008)
341 cadd(seal * 0.42, seal * 0.025, seal * 0.035)
342}
344# Folio II: an armillary sphere and orbiting lamps on a star-sprinkled chart.
345pixel armillary {
346 px = u
347 py = v + 0.025
348 grain = fbm(px * 4 + 31, py * 4 + 12, 3)
349 pal(parchment, 0.34 + grain * 0.26)
350 cmul(0.70 + 0.10 * drift)
351 edge = max(abs(u) / aspect, abs(v))
352 cmul(1 - 0.65 * smooth(0.65, 1.0, edge))
353 chart = boxline(px, py, 1.43, 0.82, 0.007)
354 cmul(1 - chart * 0.65)
356 # A sparse cellular star field behind the instrument.
357 cell = vor(px * 5.2 + 8, py * 5.2 - 4)
358 cid = r1
359 stars = exp(-cell * 75) * step(0.64, cid) * (0.25 + 0.75 * hash(cid * 91))
360 cadd(stars * 0.34, stars * 0.23, stars * 0.08)
362 rad = polar(px, py)
363 ang = r1
364 outer = ring(px, py, 0.60, 0.005)
365 outer2 = ring(px, py, 0.555, 0.003)
366 ticks = pow(abs(cos((ang - turn * 0.3) * 24)), 70) * smooth(0.54, 0.56, rad) * (1 - smooth(0.60, 0.62, rad))
367 cmul(1 - max(outer, max(outer2, ticks)) * 0.73)
369 arms = 0
370 repeat i 4 {
371 qx = rot(px, py, turn * (0.5 + i * 0.11) + i * pi / 4)
372 qy = r1
373 ell = abs(len(qx, qy * (1.35 + i * 0.28)) - (0.47 + i * 0.026))
374 arms = max(arms, exp(-ell * 135))
375 }
376 axis = exp(-abs(px * cos(turn) + py * sin(turn)) * 180) * (1 - smooth(0.54, 0.61, rad))
377 cadd(arms * (0.54 + gild * 0.32), arms * (0.27 + gild * 0.27), arms * 0.055)
378 cmul(1 - axis * 0.62)
380 # Sun and moon travel on different periods; their previous positions linger.
381 sa = beat * 0.23
382 sx = cos(sa) * 0.47
383 sy = sin(sa) * 0.30
384 sun = exp(-len(px - sx, py - sy) * 55)
385 ma = -beat * 0.16 + 2.1
386 mx = cos(ma) * 0.56
387 my = sin(ma) * 0.42
388 moon = exp(-len(px - mx, py - my) * 70)
389 cadd(sun * 1.05 + moon * 0.16, sun * 0.60 + moon * 0.32, sun * 0.10 + moon * 0.40)
390 pulseRing = ring(px, py, fract(beat * 0.5) * 0.62, 0.008) * (1 - fract(beat * 0.5)) * pluckE
391 cadd(pulseRing * 0.34, pulseRing * 0.12, pulseRing * 0.025)
393 ttl = centred(title, 0.75, 0.095)
394 cadd(ttl * 0.72, ttl * 0.42, ttl * 0.10)
395 lab = centred(orbis, -0.665, 0.068)
396 cmul(1 - lab * 0.72)
397 foot = centred(line3, -0.765, 0.038)
398 cmul(1 - foot * 0.72)
399 cprevz(0.5, 0.5, 1.002, 0.0015 * sin(beat * 0.2), 0.10 + pluckE * 0.06)
400}
402# Folio III: the red initial, nocturnal ink and vegetal computation.
403pixel initial {
404 px = u
405 py = v
406 mist = fbm(px * 2.3 + beat * 0.006, py * 2.3, 4)
407 pal(midnight, 0.12 + mist * 0.44 + (py + 1) * 0.06)
408 fil = kali(px * 0.62 + 0.3, py * 0.62, 0.73, 0.79, 6)
409 veins = exp(-fil * 20) * (0.20 + 0.30 * drift)
410 cadd(veins * 0.07, veins * 0.22, veins * 0.19)
412 border = boxline(px, py, 1.44, 0.84, 0.008)
413 cadd(border * 0.33, border * 0.20, border * 0.055)
414 # The oversized V has a vermilion body and eight gilt offsets.
415 vx = -1.23
416 vy = 0.51
417 vs = 0.67
418 halo = 0
419 repeat k 8 {
420 a = k * tau / 8 + turn * 0.08
421 halo = max(halo, textline(initial, vx + cos(a) * 0.018, vy + sin(a) * 0.018, vs))
422 }
423 body = textline(initial, vx, vy, vs)
424 cadd(halo * (0.68 + gild * 0.28), halo * (0.36 + gild * 0.25), halo * 0.055)
425 cmul(1 - body * 0.82)
426 cadd(body * 0.52, body * 0.025, body * 0.035)
427 inner = textline(initial, vx + 0.008, vy - 0.008, vs * 0.94)
428 cmul(1 - inner * 0.26)
430 # Rubricated text is set as a measured column to the right of the initial.
431 cadd(0.20, 0.12, 0.045)
432 t1 = textline(line1, -0.38, 0.44, 0.047)
433 t2 = textline(line2, -0.38, 0.20, 0.047)
434 t3 = textline(line3, -0.38, -0.04, 0.047)
435 t4 = textline(line4, -0.38, -0.28, 0.047)
436 type = max(max(t1, t2), max(t3, t4))
437 cadd(type * 0.74, type * 0.66, type * 0.40)
438 rules = exp(-abs(py - 0.56) * 250) + exp(-abs(py + 0.49) * 250)
439 rules = rules * step(-0.40, px) * (1 - step(1.28, px))
440 cadd(rules * 0.38, rules * 0.08, rules * 0.035)
442 # A quill-like gold filament writes a moving underline.
443 writeX = -0.36 + fract(beat * 0.25) * 1.55
444 nib = exp(-len(px - writeX, py + 0.405) * 65)
445 cadd(nib * 0.85, nib * 0.52, nib * 0.12)
446 spark = pow(max(0, sin(px * 27 + py * 19 - beat * 0.8)), 34) * leadE
447 cadd(spark * 0.11, spark * 0.08, spark * 0.025)
448}
450# Folio IV: all the manuscript's systems overprint one another in gold feedback.
451pixel overprint {
452 px = rot(u, v, 0.018 * sin(beat * 0.08))
453 py = r1
454 grain = fbm(px * 3.2 + 4, py * 3.2 + beat * 0.004, 4)
455 pal(parchment, 0.26 + grain * 0.25 + 0.05 * sin(px * 2 + turn))
456 cmul(0.62 + 0.12 * drift)
457 rad = polar(px, py + 0.03)
458 ang = r1 - turn * 0.45
459 lattice = pow(abs(cos(ang * 12)), 42) * (1 - smooth(0.72, 0.79, rad))
460 rings = ring(px, py + 0.03, 0.60 + kickE * 0.025, 0.004)
461 rings = max(rings, ring(px, py + 0.03, 0.43, 0.003))
462 geometry = max(lattice * 0.42, rings)
463 cadd(geometry * 0.34, geometry * 0.16, geometry * 0.035)
465 # Orbital cells become tiny illuminated rubies around the title.
466 cells = vor(cos(ang) * rad * 8 + turn, sin(ang) * rad * 8 - turn)
467 gems = exp(-cells * 52) * smooth(0.38, 0.50, rad) * (1 - smooth(0.70, 0.78, rad))
468 cadd(gems * (0.25 + pluckE * 0.55), gems * 0.035, gems * 0.045)
470 # Feed back the chart, then set crisp type over its moving afterimage.
471 cprevz(0.5, 0.51, 1.006 + kickE * 0.008, 0.003 + pluckE * 0.004, 0.18 + pluckE * 0.08)
472 halo = 0
473 repeat k 4 {
474 halo = max(halo, centred(title, 0.31 + (k - 1.5) * 0.014, 0.245))
475 }
476 ttl = centred(title, 0.31, 0.245)
477 cmul(1 - halo * 0.40)
478 cadd(ttl * (0.86 + pluckE * 0.14), ttl * (0.55 + gild * 0.25), ttl * 0.14)
479 sub = centred(subtitle, 0.015, 0.066)
480 cmul(1 - sub * 0.70)
481 rule = boxline(px, py, 1.42, 0.83, 0.006)
482 cadd(rule * 0.34, rule * 0.17, rule * 0.035)
483 scroll = scroller(colophon, -0.65, 0.072, 0.72)
484 cadd(scroll * 0.84, scroll * 0.64, scroll * 0.28)
485}
487post {
488 bloom = (tap(-2, 0) + tap(2, 0) + tap(0, -2) + tap(0, 2) + tap(-1, -1) + tap(1, 1)) / 6
489 split = tap(-1 - floor(kickE * 2), 0)
490 rr = mix(cget(0), split, 0.10 + snapE * 0.10)
491 rgb(rr + bloom * 0.065, cget(1) + bloom * 0.050, cget(2) + bloom * 0.035)
492 vign = max(abs(u) / aspect, abs(v))
493 cmul(1 - 0.25 * smooth(0.68, 1.0, vign))
494 grain = (hash(floor(x * w) * 0.713 + floor(y * h) * 19.17 + frame * 0.017) - 0.5) * 0.018
495 cadd(grain, grain, grain)
496}
Click a line number to link to that line.