NorthCel (.ncel) — The AI-Drawn Video Programming Language
NorthCel (.ncel) is North Noir's domain-specific drawing language designed from the ground up for AI coding agents and classical frame-by-frame animation. Built by combining the strongest attribute of three proven execution models — MoonBit-style typed scene ASTs and quarter-pixel contour decoding, Bend-style stateless parallel agent swarms, and GLSL-style 4x4 subpixel supersampled rendering — NorthCel lets AI agents author and surgically edit every frame in code.
The Three-Language Architecture: MoonBit + Bend + GLSL
1 · MoonBit-Style Typed Scene AST & Diagnostics (Declarative Layers, Reusable Defs & Sub-0.25px Contour Chains)
NorthCel organizes every scene or multi-frame film into a clean typed AST (scene, film, paper, def/use, layer, stroke, ribbon, bend_swarm) with strict line:column diagnostics and two contour encodings: 0.25px quarter-pixel relative chains for subpixel fidelity and 1px Base-63 chains for compact token budgets.
2 · Bend-Style Parallel Agent Swarms & Line Boil (Stateless Order-Independent Detail Evaluation)
Hand-drawn animation requires hundreds of self-similar organic marks: wet hair fringes, beard bristles, chest hair, rain streaks, and water spray. NorthCel models these as stateless parallel agents (bend_swarm) and stateless vertex line boil whose result is a pure function of (seed, frame_index, agent_id).
3 · GLSL-Style 4x4 Subpixel Supersampled Rendering (Even-Odd Winding Parity, Paper Grain & Pure-Python Reference CLI)
Every frame is a pure function of (time, seed, coordinates) evaluated with even-odd winding parity on a 4x4 subpixel grid (0.25px resolution). The official northcel PyPI package ships a zero-GPU pure-Python + NumPy reference renderer that matches our OpenGL 4.3 GLSL backend within 0.0115 MAE (0.99999+ SSIM).
Measured Benchmark vs JS+SVG Baseline
- Test Video 7 (90 Frames @ 1536x864) — NorthCel v0.2 Fitted (0.25px-b63 + palette) — SSIM: 0.9728 (mean 90f) / 0.9756 (global), MAE: 4.90 gray / 5.46 rgb, Edge IoU: 0.496 (0.947 F1), Wet Hair Fringe SSIM: 0.9945 (best f0001), Beard SSIM: 0.9479 (worst f0066), Size: 10,161 B/frame (-86.4% vs v0.1)
- Test Video 7 (8 Rep. Frames) — NorthCel v0.2 AI-Authored by Hand (cel + palette) — SSIM: 0.7869 (mean 8f) / 0.8527 (global), MAE: 19.55 rgb, Edge IoU: 0.032, Wet Hair Fringe SSIM: 0.9284 (f0001), Beard SSIM: 0.8820 (f0028), Size: 4,718 B/frame (-46.6% vs v0.1)
- Shower Benchmark (2 Frames @ 1024x1024) — NorthCel Subpixel (0.25px) — SSIM: 0.9617 / 0.9718, MAE: 3.30 / 3.30, Edge IoU: 0.695 / 0.658, Wet Hair Fringe SSIM: 0.936 / 0.940, Beard SSIM: 0.961 / 0.963, Size: 131,240 B (-32% vs raw)
- Shower Benchmark (2 Frames @ 1024x1024) — NorthCel Compact (1px Base-63) — SSIM: 0.9366 / 0.9463, MAE: 4.61 / 4.58, Edge IoU: 0.376 / 0.435, Wet Hair Fringe SSIM: 0.880 / 0.899, Beard SSIM: 0.917 / 0.924, Size: 29,560 B (-20% vs v7)
- Shower Benchmark — v7 JS + SVG Path2D Baseline — SSIM: 0.9109 / 0.9120, MAE: 5.30 / 5.78, Edge IoU: 0.330 / 0.370, Wet Hair Fringe SSIM: 0.589 / 0.566, Beard SSIM: 0.697 / 0.716, Size: 37,120 B
Questions
Why create NorthCel (.ncel) instead of writing raw JavaScript, SVG, or GLSL?
Raw SVG and Canvas Path2D treat hand-drawn frames like flat vector stickers, often collapsing fine details like wet hair strands or beard stubble into solid blobs. Raw GLSL is a world-class pixel and wash engine, but writing a full animated scene with thousands of coordinates in a raw fragment shader is verbose and brittle for AI models. NorthCel (.ncel) gives AI agents a high-level declarative grammar combining MoonBit-style typed ASTs, Bend-style parallel swarms, and 4x4 subpixel GLSL rendering semantics.
How do I install and run the northcel CLI?
Run pipx install northcel (or pip install northcel). That installs both northcel and the short alias ncel with zero GPU or external compiler dependencies. Use northcel check scene.ncel to validate, northcel fmt -w scene.ncel to format, northcel render scene.ncel -o frame0.png to render a still frame, and northcel film film.ncel -o frames/ --mp4 out.mp4 to render an animated sequence.
How does NorthCel support surgical edits with Adjust?
Every .ncel scene or film cleanly separates paper settings, reusable def blocks, named tonal wash layers (tile_wall, skin_envelope, hair_dome, ink_contours), tapered strokes/ribbons, and named bend_swarm blocks (water_droplets, beard_and_chest_bristles). When you ask an AI agent to tweak the water spray or thin out the beard, it edits only that named block while every other layer remains byte-identical.
What did the 90-frame Test Video 7 benchmark show in NorthCel v0.2.0?
We recreated all 90 drawings (1536x864, 15s at 24fps) of a complete Ruvil 7.3 film (monochrome linework opening, jump, blue sky and clouds, colour arrival, grass landing, sitting with a walking duck). Adding v0.2.0 Quarter-Pixel Base-63 encoding (precision: 0.25px-b63), named palettes (palette { ... }), coupled fill+outline cels (cel ... outline: ($ink, 5px)), and frame deltas (drop) reduced the 90-frame fitted film size by 86.4% (from 6.70 MB / 4.25M tokens to 914 KB / 684k tokens — 10.1 KB / 7.6k tokens per frame) while achieving 0.9728 Block SSIM (0.9756 Global SSIM) and 0.496 Edge IoU. Hand-authored AI frames using cel + palette averaged 4.7 KB (3,303 tokens) per frame at 0.7869 Block SSIM (0.8527 Global SSIM).