Production source excerpts. These document the implementation; they are not a complete standalone build kit. replicate-ending.py Source SHA-256: 8b6c1d1c47087996d7a23d245de8dd597d3cbc26e23240a0bf64d853009a622f Starting source line: 48 elif args.action=='submit': assert path and not path.exists(),'Attempt number must be new; never re-submit after an unknown outcome.' previous=[load(p) for p in OUT.glob('attempt-*.json')] assert len(previous)= MARGIN_X and box[2] <= W - MARGIN_X, (value, box) assert box[1] >= MARGIN_Y and box[3] <= H - MARGIN_Y, (value, box) draw.text(point, row, font=face, fill=colour, anchor='lt') boxes.append(box) LAYOUT_AUDIT[(value, size, xy)] = dict(text=value, size=size, boxes=boxes, safe=True) return len(rows) * (size + 17) - 17 native_sources.py Source SHA-256: a1cf8598d541c27dd0278ac438af8fe474227a445c817ea02c1b96ad1c07e8f8 def construction(t): source_tick = min(275, round(int(t * 24) * 276 / 252)) source_t = source_tick / 24 plate = load(str(PROD / 'butterfly/local-motion-05/construction' / f'frame-{source_tick + 1:04}.png')) plate = plate.resize((1000, 1000), Image.Resampling.LANCZOS) match = smooth((source_t - 9.85) / .95) if match: original = load(str(PROD / 'assets/butterfly-source.jpg')).resize((1000, 1000), Image.Resampling.LANCZOS) plate = Image.blend(plate, original, match) image = Image.new('RGB', (W, H), DARK) image.paste(plate, (850, 40)) index = max(i for i, (start, _) in enumerate(STAGES) if source_t >= start) lettering(image, 'Build in Blender.', (128, 128), SUPPORT, width=650) lettering(image, STAGES[index][1], (128, 360), EDIT, width=650, serif=True) lettering(image, 'Photograph →\nBlender → photograph', (128, 650), SUPPORT, width=650) draw = ImageDraw.Draw(image) for i in range(len(STAGES)): draw.rounded_rectangle((128 + i * 61, 875, 172 + i * 61, 883), radius=3, fill=GOLD if i <= index else '#3a5147') return image opening_sound.py Source SHA-256: d2617514055d3c2e857c46d76cab4a26c99cb1cf51682d9ec2459c7465165ba1 """A locally authored fast-forward texture; never changes the master score.""" import json import subprocess import wave from pathlib import Path import numpy as np RATE = 48000 SECONDS = 12 STOP = 5 def smooth(values): values = np.clip(values, 0, 1) return values * values * (3 - 2 * values) def write_wave(path, samples): with wave.open(str(path), 'wb') as output: output.setnchannels(2) output.setsampwidth(2) output.setframerate(RATE) output.writeframes((np.clip(samples, -1, 1) * 32767).astype('