Files
OrbitTv/design/arcade/build-cast.py
T
pauljdandClaude Opus 5.5 52d81c9bf7
pauljd/davidson-ci: Davidson CI / quality (push) Failing after 1m49s
pauljd/davidson-ci: Davidson CI / ai-review (push) Failing after 1m30s
Ollie, Star Chase and BumbleHive (from 0.108.28); cast and model sheets renamed
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-05 21:26:14 +00:00

90 lines
6.5 KiB
Python

#!/usr/bin/env python3
"""The Orbit cast (Paul, 5 November 2026): Orbit's own sky characters, drawn as the app draws them (ArcadeOrbMan.kt)."""
import math
from pathlib import Path
from PIL import Image, ImageDraw, ImageFont
HERE = Path(__file__).resolve().parent
F = HERE.parent / 'channels' / 'network-fonts'
def font(n, s): return ImageFont.truetype(str(F / n), s)
anton, semi, reg = (lambda s: font('anton-regular.ttf', s)), (lambda s: font('barlow-semibold.ttf', s)), (lambda s: font('barlow-regular.ttf', s))
W, H, SS = 1920, 1080, 2
NAVY, PANEL, MUTED, YELLOW, WHITE, INK = (7, 22, 50), (18, 53, 107), (183, 203, 232), (255, 222, 89), (255, 255, 255), (20, 33, 61)
im = Image.new('RGB', (W * SS, H * SS), NAVY); d = ImageDraw.Draw(im)
def S(v): return v * SS
def circ(c, r, fill): d.ellipse((S(c[0] - r), S(c[1] - r), S(c[0] + r), S(c[1] + r)), fill=fill)
def eyes(c, r, look=(1, 0)):
for side in (-1, 1):
e = (c[0] + side * r * .34, c[1] - r * .1); circ(e, r * .26, WHITE); circ((e[0] + look[0] * r * .14, e[1] + look[1] * r * .14), r * .13, INK)
def mascot(c, r):
rw, rh = r * 2.7, r * .9; top = (c[0] - rw / 2, c[1] - rh / 2 + r * .15)
d.arc((S(top[0]), S(top[1]), S(top[0] + rw), S(top[1] + rh)), 180, 360, fill=WHITE, width=int(S(r * .2)))
circ(c, r * 1.08, INK); circ(c, r, (247, 169, 40)); circ((c[0] - r * .4, c[1] - r * .45), r * .32, (250, 200, 120))
circ((c[0] - r * .33 + r * .16, c[1] - r * .2), r * .13, INK); circ((c[0] + r * .33 + r * .16, c[1] - r * .2), r * .13, INK)
m = r * .42; d.arc((S(c[0] - m + r * .16), S(c[1] - m * .55), S(c[0] + m + r * .16), S(c[1] + m * .55)), 15, 165, fill=INK, width=int(S(r * .14)))
d.arc((S(top[0]), S(top[1]), S(top[0] + rw), S(top[1] + rh)), 0, 180, fill=WHITE, width=int(S(r * .2)))
def blaze(c, r, col):
for k in (3, 2, 1):
a = 1.0 if k == 1 else .85 / k; base = (255, 194, 61) if k == 1 else (255, 224, 102)
fill = tuple(int(PANEL[i] + (base[i] - PANEL[i]) * a) for i in range(3)); circ((c[0] - r * .55 * k, c[1]), r * (.75 - .15 * k), fill)
circ(c, r * .95, col); circ((c[0] - r * .35, c[1] - r * .4), r * .3, tuple(min(255, v + 45) for v in col)); eyes(c, r)
for side in (-1, 1): d.line((S(c[0] + side * r * .58), S(c[1] - r * .48), S(c[0] + side * r * .14), S(c[1] - r * .32)), fill=INK, width=int(S(r * .1)))
def zip_(c, r, col):
pts = []
for k in range(10):
a = -math.pi / 2 + k * math.pi / 5; rad = r * 1.12 if k % 2 == 0 else r * .6
pts.append((S(c[0] + rad * math.cos(a)), S(c[1] + rad * math.sin(a))))
d.polygon(pts, fill=col); circ(c, r * .62, col); eyes(c, r)
def drift(c, r, col):
for (ox, oy), sz in (((0, .12), .72), ((-.52, .22), .48), ((.52, .22), .48), ((-.22, -.32), .5), ((.3, -.26), .46)): circ((c[0] + ox * r, c[1] + oy * r), r * sz, col)
eyes(c, r)
def luna(c, r, col):
circ(c, r * .95, col)
for (ox, oy), sz in (((.4, .35), .17), ((-.45, .4), .12), ((.5, -.45), .1)): circ((c[0] + ox * r, c[1] + oy * r), r * sz, tuple(int(v * .84) for v in col))
circ((c[0] - r * .38, c[1] - r * .42), r * .28, tuple(min(255, v + 40) for v in col)); eyes(c, r)
for side in (-1, 1):
x = c[0] + side * r * .34 - r * .27; y = c[1] - r * .37; d.pieslice((S(x), S(y), S(x + r * .54), S(y + r * .5)), 180, 360, fill=col)
def bumble(c, r, col):
k = r / 24; navy = INK; honey = (255, 216, 74)
for side in (-1, 1):
wx, wy = c[0] + side * 13 * k, c[1] - 22 * k
d.ellipse((S(wx - 15 * k), S(wy - 10 * k), S(wx + 15 * k), S(wy + 10 * k)), fill=(214, 224, 245))
tx, ty = c[0] + side * 15 * k, c[1] - 37 * k
d.line((S(c[0] + side * 6 * k), S(c[1] - 22 * k), S(c[0] + side * 9 * k), S(c[1] - 32 * k), S(tx), S(ty)), fill=navy, width=int(S(2.5 * k)), joint='curve')
d.regular_polygon((S(tx), S(ty - k), S(4.5 * k)), 6, rotation=30, fill=honey)
circ(c, 24 * k, honey)
# The stripes, clipped to the round body.
mask = Image.new('L', im.size, 0); ImageDraw.Draw(mask).ellipse((S(c[0] - 24 * k), S(c[1] - 24 * k), S(c[0] + 24 * k), S(c[1] + 24 * k)), fill=255)
stripes = Image.new('L', im.size, 0); sd = ImageDraw.Draw(stripes)
for y0 in (6, 16): sd.rectangle((S(c[0] - 26 * k), S(c[1] + y0 * k), S(c[0] + 26 * k), S(c[1] + (y0 + 6) * k)), fill=255)
from PIL import ImageChops
im.paste(navy, (0, 0), ImageChops.multiply(mask, stripes))
circ((c[0] - 9 * k, c[1] - 11 * k), 7 * k, (255, 230, 150))
for side in (-1, 1): circ((c[0] + side * 8 * k, c[1] - 4 * k), 6.2 * k, WHITE); circ((c[0] + side * 8 * k + 1.5 * k, c[1] - 4 * k), 3.1 * k, navy)
def scared(c, r):
circ(c, r * .95, (77, 107, 255)); w = r * .9; y = c[1] + r * .3
d.line([(S(c[0] - w / 2 + k * w / 4), S(y - (r * .14 if k % 2 else 0))) for k in range(5)], fill=WHITE, width=int(S(r * .1)))
circ((c[0] - r * .3, c[1] - r * .15), r * .1, WHITE); circ((c[0] + r * .3, c[1] - r * .15), r * .1, WHITE)
d.text((S(80), S(60)), 'THE ORBIT CAST', font=anton(S(72)), fill=YELLOW)
d.text((S(84), S(160)), 'Our own characters, drawn the same everywhere', font=semi(S(40)), fill=WHITE)
cards = [('Ollie', (247, 169, 40), 'The Tots mascot.', 'Stars in Star Chase.', mascot),
('Blaze', (255, 138, 61), 'A hot-headed comet.', 'Comes straight for you.', blaze),
('Zip', (255, 79, 163), 'A shooting star.', 'Cuts in ahead of you.', zip_),
('Drift', (53, 214, 242), 'A sleepy nebula.', 'Chases close, drifts off.', drift),
('Luna', (167, 123, 255), 'A little moon.', 'Guards the stars nearest you.', luna),
('Bumble', (255, 216, 74), 'BumbleHive\'s bee.', 'Fires flowers at the hive.', bumble)]
for i, (name, col, l1, l2, draw) in enumerate(cards):
x = 60 + i * 302; y = 260
d.rounded_rectangle((S(x), S(y), S(x + 284), S(y + 560)), S(14), fill=PANEL)
c = (x + 142, y + 190)
if draw is mascot: draw(c, 62)
elif draw is bumble: draw((c[0], c[1] + 14), 60, col)
else: draw(c, 72, col)
d.text((S(x + 24), S(y + 330)), name.upper(), font=anton(S(44)), fill=col)
d.text((S(x + 24), S(y + 410)), l1, font=semi(S(24)), fill=WHITE)
d.text((S(x + 24), S(y + 446)), l2, font=reg(S(21)), fill=MUTED)
scared((1500, 930), 44)
d.text((S(80), S(900)), 'Grab a power hexagon and the screen glows: the cast turn pale and worried, and can be caught.', font=reg(S(30)), fill=MUTED)
d.text((S(80), S(944)), 'With Reduce motion on, the glow holds steady instead of breathing.', font=reg(S(30)), fill=MUTED)
d.text((S(1560), S(912)), 'frightened', font=reg(S(26)), fill=MUTED)
im.resize((W, H), Image.LANCZOS).save(HERE / 'orb-man-cast.png'); print('cast done')