Transforming real river geometry into procedurally generated typography using computational geometry, heuristic optimization, and raster image compositing.
Website
CurseYou is a procedural graphics engine that generates readable words from real river imagery.
Instead of rendering characters from a traditional font, the engine searches a curated database of river glyphs, evaluates numerous candidate combinations, optimizes their continuity using Beam Search, computes a geometric layout, and procedurally stitches them into a single continuous river composition.
Unlike conventional typography systems where every glyph has a fixed appearance and position, CurseYou constructs every word dynamically.
Each generated image is produced through:
- metadata-driven glyph retrieval
- heuristic optimization
- computational geometry
- affine transformations
- procedural bridge generation
- alpha compositing
- raster rendering
rather than traditional font rendering.
| File | Description |
|---|---|
| README.md | Project overview and quick start |
| LICENSE | MIT License |
| CONTRIBUTING.md | Contribution guidelines |
| CHANGELOG.md | Project history |
| SECURITY.md | Security policy |
| ROADMAP.md | Planned improvements |
| CITATION.cff | Citation information |
| Document | Description |
|---|---|
| PROJECT_OVERVIEW.md | Introduction and project goals |
| ARCHITECTURE.md | System architecture |
| PIPELINE.md | Processing pipeline |
| ALGORITHMS.md | Optimization and rendering algorithms |
| MATHEMATICS.md | Mathematical foundations |
| DATASET.md | Dataset organization |
| TECHNICAL_DETAILS.md | Internal implementation |
| API.md | Backend API |
| PERFORMANCE.md | Performance characteristics |
| FAQ.md | Frequently Asked Questions |
- Overview
- Why CurseYou?
- Key Features
- Example Output
- System Architecture
- Processing Pipeline
- Core Technologies
- Mathematical Foundations
- Backend Modules
- Repository Structure
- Installation
- Quick Start
- Documentation
- Roadmap
- Contributing
- License
CurseYou/
│
├── README.md
├── LICENSE
├── CONTRIBUTING.md
├── CHANGELOG.md
├── SECURITY.md
├── ROADMAP.md
├── CITATION.cff
│
├── docs/
│ ├── PROJECT_OVERVIEW.md
│ ├── ARCHITECTURE.md
│ ├── PIPELINE.md
│ ├── ALGORITHMS.md
│ ├── MATHEMATICS.md
│ ├── DATASET.md
│ ├── TECHNICAL_DETAILS.md
│ ├── API.md
│ ├── PERFORMANCE.md
│ └── FAQ.md
│
├── backend/
│ ├── main.py
│ ├── server.py
│ ├── requirements.txt
│ ├── river_engine/
│ ├── tests/
│ └── assets/
│
├── frontend/
│ ├── src/
│ ├── public/
│ └── package.json
│
└── assets/
- Overview
- Why CurseYou?
- Key Features
- Example Output
- System Architecture
- Processing Pipeline
- Core Algorithms
- Mathematical Foundations
- Project Structure
- Installation
- Quick Start
- Configuration
- Performance
- Documentation
- Roadmap
- Contributing
- License
Typography has traditionally relied on predefined vector glyphs stored inside font files.
CurseYou explores a different approach.
Instead of selecting glyphs from a font, the engine constructs an entirely new composition from extracted river geometries.
Each character exists as multiple river candidates.
The backend then:
- retrieves all available candidates,
- evaluates geometric compatibility,
- searches for the optimal sequence,
- aligns neighbouring river segments,
- generates smooth junctions,
- composites the result into a seamless image.
Every generated word is therefore unique.
Traditional font rendering systems answer a relatively simple question:
"Which glyph should represent this character?"
The glyph already exists inside a font file. The rendering engine simply determines where it should be placed.
CurseYou approaches typography from a fundamentally different perspective.
Instead of asking which glyph should be drawn, it asks:
"Which combination of real river geometries best represents this entire word while preserving natural river flow?"
Every character has multiple possible river representations. Rather than selecting the first available candidate, the backend evaluates many possible combinations, scores their compatibility, computes an optimized sequence using Beam Search, and procedurally assembles the final composition.
This transforms typography into a constrained optimization problem instead of a traditional rendering problem.
Every generated image is unique and is computed at runtime.
- Real river imagery used as the source dataset
- Metadata-driven glyph retrieval
- Multiple candidates for every character
- Structured JSON metadata
- Extensible asset library
- Beam Search sequence optimization
- Candidate pruning
- Multi-stage scoring
- Connection quality evaluation
- Width consistency analysis
- Flow continuity scoring
- Geometric layout computation
- River centerline alignment
- Affine transformations
- Distance and angle calculations
- Bounding-box computation
- Relative glyph positioning
- Automatic junction detection
- Conditional bridge generation
- Bézier curve interpolation
- Seamless transition handling
- Dynamic overlap computation
- Alpha compositing
- Feather mask generation
- Layered raster rendering
- Dynamic canvas generation
- PNG export
- Modular rendering pipeline
- Modular backend
- Independent processing stages
- Configurable engine
- Metadata-driven workflow
- Separation of optimization and rendering
- Easily extensible codebase
Most typography and image generation systems fall into one of these categories:
| Approach | Used by CurseYou |
|---|---|
| Traditional Vector Fonts | ❌ |
| SVG Glyph Rendering | ❌ |
| Neural Image Generation | ❌ |
| Diffusion Models | ❌ |
| Image Morphing | ❌ |
| Texture Synthesis | ❌ |
| Procedural River Composition | ✅ |
CurseYou introduces a different approach.
Instead of generating images through artificial intelligence or rendering predefined vector glyphs, it constructs typography by procedurally assembling real river geometries.
The backend combines concepts from several computer science disciplines:
- Computational Geometry
- Heuristic Optimization
- Beam Search
- Image Processing
- Raster Graphics
- Procedural Layout Generation
This combination allows the engine to generate continuous river typography without relying on conventional font rendering techniques.
The following illustrates the generation process.
Input
CURSEYOU
↓
Retrieve River Glyph Candidates
↓
Beam Search Optimization
↓
Geometric Layout
↓
Bridge Generation
↓
Image Compositing
↓
Continuous River Typography
Additional examples:
SHANTANU
↓
Procedurally Generated River Typography
GOOGLE
↓
Procedurally Generated River Typography
INDIA
↓
Procedurally Generated River Typography
Tip: Replace the examples above with screenshots from your project. Showing actual generated results near the top of the README makes the repository much more engaging.
- Python
- Flask
- Pillow (PIL)
- NumPy
- React
- Vite
- JavaScript
- CSS
- Beam Search
- Heuristic Candidate Scoring
- Computational Geometry
- Affine Transformations
- Bézier Curve Interpolation
- Alpha Compositing
- Feather Mask Blending
- Raster Rendering
- Dynamic Canvas Generation
- PNG River Glyph Dataset
- JSON Metadata
- Skeleton Images
- Overlay Images
- River Ribbon Assets
CurseYou treats typography as a search and optimization problem rather than a font rendering problem.
The engine separates every major responsibility into an independent module:
- Metadata Loading
- Candidate Retrieval
- Optimization
- Layout Computation
- Stitching
- Bridge Generation
- Rendering
This separation improves readability, maintainability, and extensibility while allowing each stage of the pipeline to evolve independently.
The CurseYou backend is designed as a modular rendering engine where each stage performs a single well-defined responsibility. Instead of tightly coupling rendering logic into one large script, the engine separates metadata loading, optimization, geometric layout, stitching, and rendering into independent components.
User Input
│
▼
Input Normalization
│
▼
Metadata Index Loader
│
▼
Candidate Retrieval Engine
│
▼
Beam Search Optimization
│
▼
Sequence Cost Analysis
│
▼
Layout Computation
│
▼
Junction Generation
│
▼
Bridge Generation
│
▼
Alpha Compositing
│
▼
PNG Image Export
The architecture follows a pipeline-based design where the output of one stage becomes the input of the next. This separation simplifies maintenance, testing, and future improvements.
Every generated image follows the same execution pipeline.
User Input
↓
Normalize Text
↓
Load Metadata
↓
Retrieve Candidate Glyphs
↓
Beam Search Optimization
↓
Evaluate Sequence Cost
↓
Compute Geometric Layout
↓
Generate River Bridges
↓
Alpha Blend Junctions
↓
Raster Composition
↓
PNG Export
Each stage transforms the data into a richer representation until the final river typography is produced.
The backend is organized into small, reusable modules.
| Module | Responsibility |
|---|---|
metadata_loader.py |
Loads glyph metadata from JSON files |
normalizer.py |
Normalizes and validates input text |
optimizer.py |
Performs Beam Search optimization |
layout.py |
Computes geometric placement of glyphs |
geometry.py |
Shared mathematical and geometric utilities |
stitcher.py |
Determines how neighbouring glyphs connect |
bridge.py |
Generates procedural bridge segments |
blending.py |
Performs alpha blending and seam removal |
renderer.py |
Renders the final river composition |
pipeline.py |
Coordinates the complete rendering workflow |
config.py |
Stores configurable engine parameters |
ribbon.py |
Handles ribbon generation utilities |
debug.py |
Debugging and visualization helpers |
types.py |
Shared data structures used across the engine |
Each module has a clearly defined responsibility, making the backend easier to understand and extend.
CurseYou combines concepts from multiple areas of computer science and mathematics.
| Area | Purpose |
|---|---|
| Computational Geometry | River alignment and layout computation |
| Beam Search | Candidate sequence optimization |
| Heuristic Optimization | Compatibility scoring |
| Affine Transformations | Translation and rotation of glyphs |
| Bézier Curves | Smooth procedural bridge generation |
| Raster Graphics | Image generation |
| Alpha Compositing | Seamless junction blending |
| Image Processing | Final rendering and export |
Several mathematical models are used throughout the rendering pipeline, including affine transformations, distance calculations, angle normalization, Bézier interpolation, and alpha blending.
A detailed explanation of these concepts is available in:
The repository includes detailed technical documentation for every major subsystem.
| Document | Description |
|---|---|
📘 PROJECT_OVERVIEW.md |
Project motivation and objectives |
🏗️ ARCHITECTURE.md |
Complete backend architecture |
⚙️ PIPELINE.md |
Rendering pipeline |
🧠 ALGORITHMS.md |
Beam Search and rendering algorithms |
📐 MATHEMATICS.md |
Mathematical concepts and formulas |
🗂️ DATASET.md |
River glyph dataset structure |
🔬 TECHNICAL_DETAILS.md |
Internal implementation details |
🌐 API.md |
Backend API documentation |
📊 PERFORMANCE.md |
Performance characteristics |
❓ FAQ.md |
Frequently Asked Questions |
If you're new to the project, the recommended reading order is:
README.md
↓
PROJECT_OVERVIEW.md
↓
ARCHITECTURE.md
↓
PIPELINE.md
↓
ALGORITHMS.md
↓
MATHEMATICS.md
↓
DATASET.md
↓
TECHNICAL_DETAILS.md
↓
API.md
↓
PERFORMANCE.md
↓
FAQ.md
CurseYou treats typography as an optimization problem rather than a rendering problem.
Every generated image is the result of searching, evaluating, aligning, and composing real river geometries into a coherent structure.
The engine prioritizes geometric continuity, visual realism, and modular architecture over predefined artistic templates.
Before running CurseYou locally, ensure the following software is installed:
- Python 3.10+
- pip
- Node.js 18+
- npm
git clone https://github.com/<your-username>/CurseYou.git
cd CurseYouNavigate to the backend directory.
cd backendCreate a virtual environment.
python -m venv venv
venv\Scripts\activatepython3 -m venv venv
source venv/bin/activateInstall the required packages.
pip install -r requirements.txtOpen a second terminal.
cd frontendInstall dependencies.
npm installcd backend
python server.pyor
python main.pydepending on your workflow.
cd frontend
npm run devOpen the displayed local URL in your browser.
- Python
- Flask
- Pillow (PIL)
- NumPy
- React
- Vite
- JavaScript
- CSS
- Beam Search
- Computational Geometry
- Affine Transformations
- Bézier Curves
- Raster Graphics
- Alpha Compositing
- Heuristic Optimization
- Procedural Rendering
- ✅ Procedural river typography generation
- ✅ Metadata-driven glyph retrieval
- ✅ Beam Search optimization
- ✅ Geometric layout engine
- ✅ Procedural bridge generation
- ✅ Alpha compositing
- ✅ Modular rendering pipeline
- ✅ REST backend
- ✅ React frontend
- ✅ Extensible dataset
Planned improvements include:
- SVG export support
- Higher-resolution rendering
- Additional river glyph datasets
- Improved optimization heuristics
- Faster rendering pipeline
- Batch word generation
- Interactive editor
- GPU-assisted rendering
See ROADMAP.md for the complete roadmap.
Contributions are welcome.
If you would like to improve CurseYou, please:
- Fork the repository.
- Create a feature branch.
git checkout -b feature/my-feature- Commit your changes.
git commit -m "Add my feature"- Push the branch.
git push origin feature/my-feature- Open a Pull Request.
Please read CONTRIBUTING.md before submitting a pull request.
The rendering pipeline is designed around modular processing rather than brute-force search.
Performance depends primarily on:
- Number of input characters
- Candidate glyph count
- Beam width
- Rendering resolution
- Bridge generation complexity
For a detailed discussion, see:
If you use CurseYou in academic research or publications, please cite the project using the information provided in:
This project is licensed under the MIT License.
See LICENSE for details.
CurseYou is an experimental procedural graphics project that combines concepts from computational geometry, heuristic optimization, image processing, and software engineering to explore a new form of typography based on real-world river imagery.
The project demonstrates how natural geographic structures can be transformed into readable typographic compositions through algorithmic processing instead of conventional font rendering.
Complete documentation is available in the docs/ directory.
📘 Project Overview
🏗️ Architecture
⚙️ Pipeline
🧠 Algorithms
📐 Mathematics
🗂️ Dataset
🔬 Technical Details
🌐 API
📊 Performance
❓ FAQ
Status: Active Development
The engine is actively evolving with improvements to optimization, rendering quality, dataset expansion, and overall system architecture.
Made with ❤️ using Python, React, Computational Geometry, and Procedural Graphics.
Continue Reading →
The following documentation explores every subsystem in detail, from metadata indexing and Beam Search optimization to Bézier bridge generation, affine transformations, alpha compositing, and rendering internals.
Procedural Typography, River Typography, Computational Geometry, Beam Search, Procedural Graphics, Image Stitching, Image Processing, Raster Compositing, GIS, Satellite Imagery, Generative Typography, Creative Coding, Algorithmic Design, Python, React.