"""Bonk Board face for Moonwater (hear-venv python): the island sign's driftwood, carved title, a coconut with a little star of impact. Scores themselves are hover text above it (bonkboard.lsl). Claude Opus 5.5 (Tessel).""" import numpy as np, pathlib from PIL import Image, ImageDraw, ImageFont, ImageFilter HERE = pathlib.Path(__file__).parent W, H = 512, 256 rng = np.random.default_rng(11) y, x = np.mgrid[0:H, 0:W] streak = np.repeat(rng.normal(size=(H, 1)), W, 1) streak = np.array(Image.fromarray(((streak - streak.min()) / np.ptp(streak) * 255).astype(np.uint8)) .resize((W // 8, H)).resize((W, H), Image.BILINEAR)) / 255.0 grain = np.sin(y / H * 2 * np.pi * 22 + 1.5 * np.sin(x / 57.0) + 0.8 * np.sin(x / 13.0 + y / 40.0)) * 0.6 + (streak - 0.5) * 1.6 v = 0.70 + 0.06 * grain + 0.05 * rng.normal(size=(H, W)) v[(y % 86) < 3] -= 0.25 base = np.array([168, 156, 138]) / 255 img = Image.fromarray((np.clip(v[..., None] * base * 1.25, 0, 1) * 255).astype(np.uint8)) d = ImageDraw.Draw(img) big = ImageFont.truetype("C:/Windows/Fonts/cambriab.ttf", 62) small = ImageFont.truetype("C:/Windows/Fonts/cambriai.ttf", 26) def carved(xy, text, font): d.text((xy[0] + 2, xy[1] + 2), text, font=font, fill=(222, 214, 198), anchor="mm") d.text(xy, text, font=font, fill=(62, 50, 40), anchor="mm") carved((W / 2 + 48, 78), "BONK BOARD", big) carved((W / 2 + 48, 150), "bump a palm, stand under it,", small) carved((W / 2 + 48, 184), "and the coconuts keep score", small) # coconut, painted on: brown ball, three eyes, a pale chip where it landed, and a burst cx, cy, r = 70, 128, 34 d.ellipse((cx - r, cy - r, cx + r, cy + r), fill=(96, 62, 36), outline=(52, 34, 22), width=3) for ex, ey in ((-9, -12), (9, -12), (0, 2)): d.ellipse((cx + ex - 5, cy + ey - 5, cx + ex + 5, cy + ey + 5), fill=(44, 28, 18)) for k in range(8): a = k * np.pi / 4 + 0.3 x0, y0 = cx - 18 + np.cos(a) * 12, cy - 44 + np.sin(a) * 12 x1, y1 = cx - 18 + np.cos(a) * 24, cy - 44 + np.sin(a) * 24 d.line((x0, y0, x1, y1), fill=(176, 84, 40), width=4) img.filter(ImageFilter.SMOOTH).save(HERE / "bonkboard.png") print("ok")