{"id":50772433,"url":"https://github.com/jo56/dla-sim-tui","last_synced_at":"2026-06-11T20:03:15.398Z","repository":{"id":328454283,"uuid":"1115603103","full_name":"jo56/dla-sim-tui","owner":"jo56","description":"Terminal-based Diffusion-Limited Aggregation (DLA) simulator","archived":false,"fork":false,"pushed_at":"2026-01-07T07:02:35.000Z","size":1318,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-13T19:42:15.875Z","etag":null,"topics":["dla","ratatui","rust","simulation","tui"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jo56.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-13T07:07:37.000Z","updated_at":"2026-01-07T07:03:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jo56/dla-sim-tui","commit_stats":null,"previous_names":["jo56/dla-simulator","jo56/dla-simulation"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/jo56/dla-sim-tui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo56%2Fdla-sim-tui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo56%2Fdla-sim-tui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo56%2Fdla-sim-tui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo56%2Fdla-sim-tui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jo56","download_url":"https://codeload.github.com/jo56/dla-sim-tui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo56%2Fdla-sim-tui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34215282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dla","ratatui","rust","simulation","tui"],"created_at":"2026-06-11T20:03:14.461Z","updated_at":"2026-06-11T20:03:15.385Z","avatar_url":"https://github.com/jo56.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DLA Sim TUI\n\n  \u003cdiv align=\"center\"\u003e\n          \u003cimg src=\"assets/frost-preview-4.png\" alt=\"frost theme preview\"\u003e\n    \u003cbr\u003e\n  \u003c/div\u003e\n\n\u003cbr\u003e\n\nA terminal-based Diffusion-Limited Aggregation (DLA) simulation using high-resolution Braille character rendering.\n\n## Installation\n\n### From GitHub (recommended)\n\n```bash\n# Install the latest version\ncargo install --git https://github.com/jo56/dla-sim-tui\n\n# Install a specific release\ncargo install --git https://github.com/jo56/dla-sim-tui --tag v0.1.0\n```\n\nAfter installation, run directly:\n\n```bash\ndla-sim-tui\n```\n\n### From source\n\n```bash\n# Clone the repository\ngit clone https://github.com/jo56/dla-sim-tui.git\ncd dla-sim-tui\n\n# Build and run\ncargo run --release\n```\n\n## Usage\n\n```bash\n# If installed via cargo install:\ndla-sim-tui\ndla-sim-tui --particles 3000 --stickiness 0.5 --seed circle --speed 10\n\n# If running from source:\ncargo run --release\ncargo run --release -- --particles 3000 --stickiness 0.5 --seed circle --speed 10\n```\n\n### Command Line Options\n\n#### Config \u0026 Presets\n\n| Option | Description |\n|--------|-------------|\n| `--config \u003cFILE\u003e` | Load settings from a JSON config file. CLI args override config values. |\n| `--preset \u003cNAME\u003e` | Load a preset by name (built-in or user-created). CLI args override preset values. |\n\n#### Simulation Mode\n\n| Option | Description |\n|--------|-------------|\n| `--classic` | Use classic Witten-Sander DLA defaults (unit lattice steps, 4-neighbor, absorb boundary). Without this flag, enhanced defaults optimized for visualization are used. |\n\n#### Basic Options\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `-p, --particles` | Number of particles (100-10000) | 5000 |\n| `-s, --stickiness` | Base adhesion probability (0.1-1.0) | 1.0 |\n| `--seed` | Seed pattern (point, line, cross, circle, ring, block, noise, scatter, multipoint, starburst) | point |\n| `--speed` | Steps per frame (1-100) | 15 |\n\n#### Movement Options\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--walk-step` | Distance per walk iteration (0.5-5.0) | 2.0 |\n| `--walk-angle` | Bias direction in degrees (0-360) | 0.0 |\n| `--walk-force` | Bias strength (0.0-0.5) | 0.0 |\n| `--radial-bias` | Radial drift (-0.3 to 0.3, neg=out, pos=in) | 0.0 |\n\n#### Sticking Options\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--neighborhood` | Neighbor check type (vonneumann, moore, extended) | moore |\n| `--multi-contact` | Minimum neighbors to stick (1-4) | 1 |\n| `--tip-stickiness` | Stickiness at branch tips (0.1-1.0) | 1.0 |\n| `--side-stickiness` | Stickiness on branch sides (0.1-1.0) | 1.0 |\n| `--stickiness-gradient` | Stickiness change per 100px (-0.5 to 0.5) | 0.0 |\n\n#### Spawn \u0026 Boundary Options\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--spawn-mode` | Spawn location (circle, edges, corners, random, top, bottom, left, right) | circle |\n| `--boundary` | Edge behavior (clamp, wrap, bounce, stick, absorb) | clamp |\n| `--spawn-offset` | Buffer from structure (5-50) | 10.0 |\n| `--escape-mult` | Escape distance multiplier (2.0-6.0) | 2.0 |\n| `--min-radius` | Minimum spawn radius (20-100) | 50.0 |\n| `--max-iterations` | Max walk steps before respawn (1000-50000) | 10000 |\n\n#### Visual Options\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--color-mode` | Color property (age, distance, density, direction) | age |\n| `--highlight` | Recent particles to highlight (0-50) | 0 |\n| `--invert` | Invert color gradient | false |\n| `-t, --theme` | Color theme (see Themes section below) | default |\n\n### Examples\n\n```bash\n# Load a built-in preset\ndla-sim-tui --preset Dendritic\n\n# Load a preset and override some settings\ndla-sim-tui --preset Coral --particles 8000 -t matrix\n\n# Classic DLA with higher stickiness at tips (creates bushier growth)\ndla-sim-tui --tip-stickiness 1.0 --side-stickiness 0.3\n\n# Directional growth from top edge\ndla-sim-tui --spawn-mode top --walk-angle 270 --walk-force 0.2\n\n# Dense blob-like growth\ndla-sim-tui --neighborhood extended --multi-contact 2\n\n# Toroidal boundary with random spawning\ndla-sim-tui --boundary wrap --spawn-mode random\n\n# Color by approach direction with inverted gradient\ndla-sim-tui --color-mode direction --invert\n\n# Run with classic Witten-Sander DLA settings\ndla-sim-tui --classic\n```\n\n### Default vs Classic Mode\n\nThe simulation offers two modes with different default parameters:\n\n| Parameter | Default Mode | Classic Mode (`--classic`) |\n|-----------|--------------|----------------------------|\n| Walk Step | 2.0 | 1.0 (unit lattice) |\n| Neighborhood | Moore (8) | Von Neumann (4) |\n| Boundary | Clamp | Absorb (respawn) |\n| Min Spawn Radius | 50.0 | 15.0 |\n| Escape Multiplier | 2.0 | 3.0 |\n\n**Default mode** is optimized for visual quality and faster growth, producing smoother, more natural-looking fractals.\n\n**Classic mode** (`--classic`) follows the canonical Witten-Sander DLA algorithm more closely, suitable for studying fractal properties and producing the characteristic angular, dendritic patterns.\n\n### Config Files\n\nExport your current settings to a JSON file by pressing `Shift+X` while running. Load settings from a config file using `--config`:\n\n```bash\n# Load settings from a config file\ndla-sim-tui --config my-settings.json\n\n# CLI args override config file values\ndla-sim-tui --config my-settings.json --particles 1000\n\n# Export: While running, press Shift+X, enter filename, press Enter\n```\n\nConfig files store all simulation parameters in JSON format and can be edited manually or shared with others.\n\n### Recording\n\nCapture your simulation as a video file:\n\n1. Press `` ` `` (backtick) to open the recording dialog (simulation pauses)\n2. Enter a filename (default: `dla_recording.mp4`)\n3. Press `Enter` to start recording (simulation resumes)\n4. Press `` ` `` again to stop and save the recording\n\n**Supported formats:**\n\n| Extension | Encoder | Notes |\n|-----------|---------|-------|\n| `.mp4` | FFmpeg (H.264) | Best quality, requires [FFmpeg](https://ffmpeg.org/) installed |\n| `.webm` | FFmpeg (VP9) | Web-friendly, requires FFmpeg |\n| `.gif` | Native Rust | No dependencies, 256 color limit |\n\nIf you request `.mp4` or `.webm` but FFmpeg isn't installed, the recording will automatically fall back to GIF format.\n\n## Controls\n\n### Navigation \u0026 System\n\n| Key | Action |\n|-----|--------|\n| `Space` | Pause/Resume simulation |\n| `R` | Reset simulation |\n| `Tab` | Next parameter |\n| `Shift+Tab` | Previous parameter |\n| `w/s/Up/Down` | Navigate/Scroll |\n| `j/k` | Adjust focused value |\n| `Esc` | Close help / exit focus |\n| `V` | Cycle view mode (Default/States/Fullscreen) |\n| `Shift+X` | Export config to file |\n| `H` | Show help (Up/Down to scroll) |\n| `Q` | Quit |\n\n### Quick Keys\n\n| Key | Action |\n|-----|--------|\n| `1-0` | Quick select seed pattern (1=Point through 0=Scatter) |\n| `+/-` | Adjust simulation speed |\n| `[/]` | Adjust highlight count |\n| `A` | Toggle color-by-age |\n| `L` | Cycle min brightness (0%/15%/30%/45%) |\n| `` ` `` | Start/stop recording |\n| `Shift+L` | Load preset |\n| `Shift+K` | Save preset |\n| `Shift+S` | Open spawn mode popup |\n| `Shift+W` | Increase walk step size |\n| `Shift+E` | Decrease walk step size |\n| `Shift+T` | Cycle theme (previous) |\n\n### Parameter Popup\n\n| Key | Action |\n|-----|--------|\n| `Shift+?` | Open popup with all parameters |\n| `Shift+letter` | Open popup filtered to parameters starting with that letter |\n| `Up/Down` | Navigate popup options |\n| `Enter` | Select and focus parameter |\n| `Esc` | Close popup |\n\n### Direct Parameter Keys\n\n| Key | Action |\n|-----|--------|\n| `C` | Cycle color scheme |\n| `T` | Cycle theme (next) |\n| `M` | Cycle color mode |\n| `N` | Cycle neighborhood type |\n| `B` | Cycle boundary behavior |\n| `P` | Focus particles parameter |\n| `I` | Invert colors |\n\n### View Modes\n\nPress `V` to cycle through view modes:\n\n| Mode | Description |\n|------|-------------|\n| Default | Narrow sidebar (22 chars) + large canvas |\n| States | Two-column params panel (48 chars) + smaller canvas - see all 27 parameters at once |\n| Fullscreen | Canvas only, maximum visualization area |\n\n## Parameters\n\nThe simulation has 27 adjustable parameters organized into four categories.\n\n### Movement Parameters\n\nControl how particles move during their random walk.\n\n| Parameter | Range | Default | Description |\n|-----------|-------|---------|-------------|\n| Walk Step Size | 0.5-5.0 | 2.0 | Distance moved per step. Larger = faster but coarser patterns |\n| Direction | 0-360° | 0 | Bias angle for directional drift |\n| Force | 0-0.5 | 0 | Strength of directional bias (0 = isotropic random walk) |\n| Radial Bias | -0.3 to 0.3 | 0 | Negative = outward drift, Positive = inward drift |\n| Adaptive Step | on/off | off | When enabled, step size scales with distance from cluster (faster simulation) |\n| Adaptive Factor | 1.0-10.0 | 3.0 | Maximum multiplier for adaptive step size |\n| Lattice Walk | on/off | on | Use 4-direction cardinal movement (classic DLA) vs continuous angles |\n\n### Sticking Parameters\n\nControl when and how particles attach to the structure.\n\n| Parameter | Range | Default | Description |\n|-----------|-------|---------|-------------|\n| Stickiness | 0.1-1.0 | 1.0 | Base probability of sticking on contact |\n| Neighborhood | VonNeumann/Moore/Extended | Moore | How many neighbors are checked (4/8/24) |\n| Multi-Contact | 1-4 | 1 | Minimum neighbors required to stick |\n| Tip Stickiness | 0.1-1.0 | 1.0 | Stickiness at branch tips (few neighbors) |\n| Side Stickiness | 0.1-1.0 | 1.0 | Stickiness on branch sides (many neighbors) |\n| Stickiness Gradient | -0.5 to 0.5 | 0 | How stickiness changes with distance from center (per 100px) |\n\n**Neighborhood Types:**\n- **Von Neumann (4)**: Only orthogonal neighbors. Creates angular, cross-like patterns.\n- **Moore (8)**: Orthogonal + diagonal. Natural fractal patterns (default).\n- **Extended (24)**: 2-cell radius. Dense, blob-like growth.\n\n### Spawn \u0026 Boundary Parameters\n\nControl where particles appear and how edges are handled.\n\n| Parameter | Range | Default | Description |\n|-----------|-------|---------|-------------|\n| Spawn Mode | 8 options | Circle | Where new particles originate |\n| Boundary | 5 options | Clamp | What happens at grid edges |\n| Spawn Offset | 5-50 | 10 | Buffer distance between structure and spawn circle |\n| Escape Mult | 2.0-6.0 | 2.0 | Multiplier for escape/respawn distance |\n| Min Radius | 20-100 | 50 | Minimum spawn radius |\n| Max Iterations | 1000-50000 | 10000 | Steps before particle respawns |\n\n**Spawn Modes:**\n- **Circle**: Classic DLA - spawn on a circle around the structure\n- **Edges**: Spawn from all four grid edges\n- **Corners**: Spawn only from corners\n- **Random**: Spawn at random positions outside structure\n- **Top/Bottom/Left/Right**: Directional spawning from a single edge\n\n**Boundary Behaviors:**\n- **Clamp**: Particles stop at edges (default)\n- **Wrap**: Particles wrap to opposite side (toroidal)\n- **Bounce**: Particles reflect off edges\n- **Stick**: Particles can stick to edges themselves\n- **Absorb**: Particles are removed and respawned at edges\n\n### Visual Parameters\n\nControl how the simulation is displayed.\n\n| Parameter | Range | Default | Description |\n|-----------|-------|---------|-------------|\n| Particles | 100-10000 | 5000 | Total number of particles |\n| Speed | 1-100 | 5 | Simulation steps per frame |\n| Color Scheme | 16 options | Ice | Color gradient |\n| Color Mode | Age/Distance/Density/Direction | Age | What property determines color |\n| Color by Age | on/off | on | Enable color gradient |\n| Invert | on/off | off | Invert color gradient |\n| Highlight | 0-50 | 0 | Recent particles shown in white |\n\n**Color Modes:**\n- **Age**: Color based on attachment order (oldest to newest)\n- **Distance**: Color based on distance from center\n- **Density**: Color based on neighbor count when stuck\n- **Direction**: Color based on approach angle when stuck\n\n### Themes\n\n12 color themes are available, each with matching UI colors and particle gradients. The default theme uses a transparent background (inherits your terminal's colors); other themes use solid backgrounds. Use `--theme \u003cname\u003e` or press `T` to cycle.\n\n| Theme | Description | CLI Name |\n|-------|-------------|----------|\n| **Default** | Grayscale + gold, transparent background | `default` |\n| **Lagoon** | Teal/gold coastal theme | `lagoon` |\n| **Bluemono** | Light theme, black/blue on white | `bluemono` |\n| **Violet** | Purple/pink gradient | `violet` |\n| **Harvest** | Earthy orange/yellow | `harvest` |\n| **Midnight** | Deep blue night sky | `midnight` |\n| **Rainbow** | Pastel purple/pink plasma | `rainbow` |\n| **Frost** | Icy cyan/white | `frost` |\n| **Deep Space** | Neon on dark blue | `deep-space` |\n| **Sunset** | Warm red/orange/yellow | `sunset` |\n| **Matrix** | Green terminal aesthetic | `matrix` |\n| **Amber** | Amber monochrome | `amber` |\n\nExample usage:\n```bash\ndla-sim-tui --theme violet\ndla-sim-tui --theme lagoon\ndla-sim-tui --theme matrix\n```\n\n### Seed Patterns\n\nPress number keys 1-0 to quickly select:\n\n| Key | Pattern | Description |\n|-----|---------|-------------|\n| 1 | Point | Single center particle - classic DLA growth |\n| 2 | Line | Horizontal line - symmetrical branching |\n| 3 | Cross | Cross pattern - four-way growth |\n| 4 | Circle | Ring of particles - inward/outward growth |\n| 5 | Ring | Thick rim with hollow core - outside-in branching |\n| 6 | Block | Solid square - surface roughening |\n| 7 | Multi-Point | Multiple competing centers |\n| 8 | Starburst | Radial spokes with rim - strong anisotropy |\n| 9 | Noise Patch | Dense noisy blob - asymmetric drift |\n| 0 | Scatter | Randomized small seeds near center |\n\n### Presets\n\nPresets allow you to quickly save and load simulation configurations.\n\n**Loading presets:** Press `Shift+L` to open the preset loader. Use Up/Down to navigate, Enter to load, Esc to cancel.\n\n**Saving presets:** Press `Shift+K` to save your current settings as a new preset. Enter a name and press Enter.\n\n12 built-in presets provide quick access to interesting configurations:\n\n| Preset | Description |\n|--------|-------------|\n| Classic | Standard DLA with default settings |\n| Dense | Compact structures with multiple contact requirement |\n| Dendritic | Thin, branching dendrite patterns |\n| Snowflake | Symmetric snowflake-like growth |\n| Coral | Thick, coral-like structures |\n| Wind-swept | Asymmetric growth with directional bias |\n| Fractal Forest | Multiple growth centers competing |\n| Edge Growth | Particles spawn from grid edges |\n| Angular | Sharp, angular growth patterns |\n| Blob | Dense, blob-like structures |\n| Gradient | Dense core with sparse edges |\n| Rain | Particles fall from top edge |\n\n#### Preset File Location\n\nUser-created presets are saved as individual JSON files. You can manually add, edit, or delete preset files:\n\n| Platform | Location |\n|----------|----------|\n| Linux | `~/.config/dla-sim-tui/presets/` |\n| macOS | `~/Library/Application Support/dla-sim-tui/presets/` |\n| Windows | `C:\\Users\\\u003cusername\u003e\\AppData\\Roaming\\dla-sim-tui\\presets\\` |\n\nEach preset is a standalone `.json` file that can be shared or backed up.\n\n## Dependencies\n\n- [ratatui](https://github.com/ratatui/ratatui) - Terminal UI framework\n- [crossterm](https://github.com/crossterm-rs/crossterm) - Cross-platform terminal manipulation\n- [rand](https://github.com/rust-random/rand) - Random number generation\n- [clap](https://github.com/clap-rs/clap) - Command line argument parsing\n- [serde](https://github.com/serde-rs/serde) - Serialization framework\n- [dirs](https://github.com/dirs-dev/dirs-rs) - Platform directory paths\n- [image](https://github.com/image-rs/image) - Image processing for video frames\n- [gif](https://github.com/image-rs/image-gif) - GIF encoding\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjo56%2Fdla-sim-tui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjo56%2Fdla-sim-tui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjo56%2Fdla-sim-tui/lists"}