nu-Eden: Sundered Skies
nu-Edenian Language
//Glyph Generation
▸How Edenji Are Created
Every edenji character is procedurally generated from a seed word using deterministic hashing. Given the same seed, the engine always produces the same glyph — enabling caching and reproducibility across the application.
▸Algorithm Overview
Step 1: Seed Hashing
The input word is hashed to produce a deterministic pseudo-random number sequence. This seed drives all subsequent decisions: radical selection, layout choice, and character type.
seed("aine") → hash → PRNG sequence
Step 2: Character Type Selection
The hash determines which of six character types to generate, weighted by frequency:
| Type | Weight | Description |
|---|---|---|
| Ideographic | 15% | Direct pictorial — single radical expanded |
| Phonetic | 10% | Sound-based — radical chosen for phonetic value |
| Compound Semantic | 25% | Two meaning radicals combined |
| Semanto-Phonetic | 35% | Semantic radical + phonetic component |
| Wildcard | 10% | Irregular or historical form |
| Innovation | 5% | Newly coined compound |
Step 3: Radical Selection
Inspired by the character type, radicals are selected from the 256-slot radical library:
- ▪Semantic radicals are chosen by meaning — the hash maps the seed's semantic domain to matching radicals
- ▪Phonetic radicals are chosen by sound — the hash maps the seed's pronunciation to radicals with similar readings
- ▪The number of radicals (1–3) depends on the character type and layout
Step 4: IDS Layout
The selected radicals are arranged using an IDS (Ideographic Description Sequence) layout template. Twelve standard compositions are available:
- ▪Two-component: ⿰ (left-right), ⿱ (top-bottom)
- ▪Three-component: ⿲ (left-middle-right), ⿳ (top-middle-bottom)
- ▪Enclosures: ⿴ ⿵ ⿶ ⿷ ⿸ ⿹ ⿺ (various open/closed surrounds)
- ▪Overlay: ⿻ (components overlapping)
Layout selection is influenced by the character type — compound semantics prefer side-by-side, while enclosures are used for entity-type characters.
Step 5: Stroke Assembly
Each radical's KAGE stroke data is remapped into its assigned layout slot. Stroke coordinates are scaled and translated from the radical's native 200×200 grid to the slot's bounding box within the final 200×200 glyph space.
radical.strokeData → remapStrokesToSlot(slot) → assembled stroke string
Individual radical stroke strings are concatenated with $ delimiters to form the complete glyph data.
Step 6: Rendering
The assembled stroke data string is passed to the KAGE engine:
- ▪Parse: Split by
$, each segment becomes a StrokeData tuple - ▪Render: Mincho (default) or Gothic font renderer processes each stroke
- ▪Output: Polygon outlines → SVG path data → inline
<svg>element
▸Dual Readings
Every generated edenji also receives two readings:
- ▪Onyomi: Monosyllabic CVC form, selected from the seed's phonological neighborhood
- ▪Kunyomi: Polysyllabic 2–3 syllable form, independently generated
Reading selection encodes syntactic information — onyomi for compounds, kunyomi for standalone use.
▸Determinism
The entire pipeline is deterministic: seed → hash → PRNG → radicals → layout → strokes → SVG. No randomness enters the system. This means:
- ▪The same word always produces the same glyph
- ▪Glyphs can be cached by seed string
- ▪The glossary stores seed strings rather than glyph data