# sapozhkov/ascii-lab-public architecture

> Architecture diagram of the GitHub repository sapozhkov/ascii-lab-public, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sapozhkov/ascii-lab-public
- Repository: https://github.com/sapozhkov/ascii-lab-public

## Overview

ASCII Lab is a gallery of procedural ASCII animal-scene reels, their source code, and interactive models. The user-facing path is to open the gallery, choose a reel, and view its model; the Python renderers provide an internal path from scene simulation and geometry to rendered frames or video. The sampled code shows Jellyfish Heart’s composition flow and Shark Intercept’s motion/render dependencies. Clownfish is largely a single renderer. Source excerpts do not establish every web-page or model interaction, so those links are omitted or marked unverified.

Main entry points: [`index.html`](https://github.com/sapozhkov/ascii-lab-public/blob/main/index.html) (Reel gallery), [`02-jellyfish-heart/source/duet.py`](https://github.com/sapozhkov/ascii-lab-public/blob/main/02-jellyfish-heart/source/duet.py) (Pair simulation), [`02-jellyfish-heart/jellyfish.py`](https://github.com/sapozhkov/ascii-lab-public/blob/main/02-jellyfish-heart/jellyfish.py) (Render commands), [`03-shark-intercept/source/proto/shark_studies/cutoff_render.py`](https://github.com/sapozhkov/ascii-lab-public/blob/main/03-shark-intercept/source/proto/shark_studies/cutoff_render.py) (Reel renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gallery["Gallery"]
  node_gallery_page["Reel gallery<br/>[index.html]"]
  node_clownfish_page["Clownfish page<br/>[index.html]"]
  node_jellyfish_page["Jellyfish page<br/>[index.html]"]
  node_shark_page["Shark page<br/>[index.html]"]
end

subgraph group_clownfish["Clownfish reel"]
  node_clownfish_renderer["Scene renderer<br/>[clownfish.py]"]
  node_clownfish_model["Interactive model<br/>[model.html]"]
end

subgraph group_jellyfish["Jellyfish reel"]
  node_jellyfish_cli["Render commands<br/>[jellyfish.py]"]
  node_jellyfish_orbit["Pair simulation<br/>[duet.py]"]
  node_jellyfish_bell["Bell geometry<br/>[swimmer.py]"]
  node_jellyfish_reef["Reef composition<br/>[reef.py]"]
  node_jellyfish_renderer["Glyph projection<br/>[renderer.py]"]
  node_jellyfish_model["Interactive model<br/>[model.html]"]
end

subgraph group_shark["Shark reel"]
  node_shark_motion["Shoal motion<br/>[cutoff_motion.py]"]
  node_shark_pose["Swimmer dynamics<br/>[dive_pose.py]"]
  node_shark_render["Reel renderer<br/>[cutoff_render.py]"]
  node_shark_channel["Reel identity<br/>[channel.py]"]
  node_shark_model["Interactive model<br/>[model.html]"]
end

node_visitor(("Gallery visitor"))

node_visitor -->|"opens"| node_gallery_page
node_gallery_page -->|"offers reel"| node_clownfish_page
node_gallery_page -->|"offers reel"| node_jellyfish_page
node_gallery_page -->|"offers reel"| node_shark_page
node_clownfish_page -.->|"model link"| node_clownfish_model
node_jellyfish_page -.->|"model link"| node_jellyfish_model
node_shark_page -.->|"model link"| node_shark_model
node_jellyfish_cli -->|"renders pair"| node_jellyfish_orbit
node_jellyfish_cli -->|"builds scene"| node_jellyfish_reef
node_jellyfish_cli -->|"uses frame rate"| node_jellyfish_renderer
node_jellyfish_orbit -->|"uses geometry"| node_jellyfish_bell
node_jellyfish_orbit -->|"projects scene"| node_jellyfish_renderer
node_jellyfish_reef -->|"uses path"| node_jellyfish_orbit
node_jellyfish_reef -->|"paints glyphs"| node_jellyfish_renderer
node_shark_render -->|"simulates motion"| node_shark_motion
node_shark_render -->|"uses pose"| node_shark_pose
node_shark_render -->|"uses identity"| node_shark_channel
node_shark_motion -->|"steps swimmer"| node_shark_pose

click node_gallery_page "https://github.com/sapozhkov/ascii-lab-public/blob/main/index.html"
click node_clownfish_page "https://github.com/sapozhkov/ascii-lab-public/blob/main/01-clownfish/index.html"
click node_jellyfish_page "https://github.com/sapozhkov/ascii-lab-public/blob/main/02-jellyfish-heart/index.html"
click node_shark_page "https://github.com/sapozhkov/ascii-lab-public/blob/main/03-shark-intercept/index.html"
click node_clownfish_renderer "https://github.com/sapozhkov/ascii-lab-public/blob/main/01-clownfish/clownfish.py"
click node_clownfish_model "https://github.com/sapozhkov/ascii-lab-public/blob/main/01-clownfish/model.html"
click node_jellyfish_cli "https://github.com/sapozhkov/ascii-lab-public/blob/main/02-jellyfish-heart/jellyfish.py"
click node_jellyfish_orbit "https://github.com/sapozhkov/ascii-lab-public/blob/main/02-jellyfish-heart/source/duet.py"
click node_jellyfish_bell "https://github.com/sapozhkov/ascii-lab-public/blob/main/02-jellyfish-heart/source/swimmer.py"
click node_jellyfish_reef "https://github.com/sapozhkov/ascii-lab-public/blob/main/02-jellyfish-heart/source/reef.py"
click node_jellyfish_renderer "https://github.com/sapozhkov/ascii-lab-public/blob/main/02-jellyfish-heart/source/renderer.py"
click node_jellyfish_model "https://github.com/sapozhkov/ascii-lab-public/blob/main/02-jellyfish-heart/model.html"
click node_shark_motion "https://github.com/sapozhkov/ascii-lab-public/blob/main/03-shark-intercept/source/proto/shark_studies/cutoff_motion.py"
click node_shark_pose "https://github.com/sapozhkov/ascii-lab-public/blob/main/03-shark-intercept/source/proto/shark_studies/dive_pose.py"
click node_shark_render "https://github.com/sapozhkov/ascii-lab-public/blob/main/03-shark-intercept/source/proto/shark_studies/cutoff_render.py"
click node_shark_channel "https://github.com/sapozhkov/ascii-lab-public/blob/main/03-shark-intercept/source/proto/channel.py"
click node_shark_model "https://github.com/sapozhkov/ascii-lab-public/blob/main/03-shark-intercept/model.html"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_gallery_page,node_clownfish_page,node_jellyfish_page,node_shark_page toneBlue
class node_clownfish_renderer,node_clownfish_model toneAmber
class node_jellyfish_cli,node_jellyfish_orbit,node_jellyfish_bell,node_jellyfish_reef,node_jellyfish_renderer,node_jellyfish_model toneMint
class node_shark_motion,node_shark_pose,node_shark_render,node_shark_channel,node_shark_model toneRose
class node_visitor toneIndigo
```

## Components

### Gallery

- [Reel gallery](https://github.com/sapozhkov/ascii-lab-public/blob/main/index.html): `index.html`
- [Clownfish page](https://github.com/sapozhkov/ascii-lab-public/blob/main/01-clownfish/index.html): `01-clownfish/index.html`
- [Jellyfish page](https://github.com/sapozhkov/ascii-lab-public/blob/main/02-jellyfish-heart/index.html): `02-jellyfish-heart/index.html`
- [Shark page](https://github.com/sapozhkov/ascii-lab-public/blob/main/03-shark-intercept/index.html): `03-shark-intercept/index.html`

### Clownfish reel

- [Scene renderer](https://github.com/sapozhkov/ascii-lab-public/blob/main/01-clownfish/clownfish.py): `01-clownfish/clownfish.py`
- [Interactive model](https://github.com/sapozhkov/ascii-lab-public/blob/main/01-clownfish/model.html): `01-clownfish/model.html`

### Jellyfish reel

- [Render commands](https://github.com/sapozhkov/ascii-lab-public/blob/main/02-jellyfish-heart/jellyfish.py): `02-jellyfish-heart/jellyfish.py`
- [Pair simulation](https://github.com/sapozhkov/ascii-lab-public/blob/main/02-jellyfish-heart/source/duet.py): `02-jellyfish-heart/source/duet.py`
- [Bell geometry](https://github.com/sapozhkov/ascii-lab-public/blob/main/02-jellyfish-heart/source/swimmer.py): `02-jellyfish-heart/source/swimmer.py`
- [Reef composition](https://github.com/sapozhkov/ascii-lab-public/blob/main/02-jellyfish-heart/source/reef.py): `02-jellyfish-heart/source/reef.py`
- [Glyph projection](https://github.com/sapozhkov/ascii-lab-public/blob/main/02-jellyfish-heart/source/renderer.py): `02-jellyfish-heart/source/renderer.py`
- [Interactive model](https://github.com/sapozhkov/ascii-lab-public/blob/main/02-jellyfish-heart/model.html): `02-jellyfish-heart/model.html`

### Shark reel

- [Shoal motion](https://github.com/sapozhkov/ascii-lab-public/blob/main/03-shark-intercept/source/proto/shark_studies/cutoff_motion.py): `03-shark-intercept/source/proto/shark_studies/cutoff_motion.py`
- [Swimmer dynamics](https://github.com/sapozhkov/ascii-lab-public/blob/main/03-shark-intercept/source/proto/shark_studies/dive_pose.py): `03-shark-intercept/source/proto/shark_studies/dive_pose.py`
- [Reel renderer](https://github.com/sapozhkov/ascii-lab-public/blob/main/03-shark-intercept/source/proto/shark_studies/cutoff_render.py): `03-shark-intercept/source/proto/shark_studies/cutoff_render.py`
- [Reel identity](https://github.com/sapozhkov/ascii-lab-public/blob/main/03-shark-intercept/source/proto/channel.py): `03-shark-intercept/source/proto/channel.py`
- [Interactive model](https://github.com/sapozhkov/ascii-lab-public/blob/main/03-shark-intercept/model.html): `03-shark-intercept/model.html`

### Other components

- **Gallery visitor**

## Connections

- Gallery visitor → Reel gallery: opens (evidence: `README.md`)
- Reel gallery → Clownfish page: offers reel (evidence: `README.md`)
- Reel gallery → Jellyfish page: offers reel (evidence: `README.md`)
- Reel gallery → Shark page: offers reel (evidence: `README.md`)
- Clownfish page → Interactive model: model link
- Jellyfish page → Interactive model: model link
- Shark page → Interactive model: model link
- Render commands → Pair simulation: renders pair (evidence: `02-jellyfish-heart/jellyfish.py`)
- Render commands → Reef composition: builds scene (evidence: `02-jellyfish-heart/jellyfish.py`)
- Render commands → Glyph projection: uses frame rate (evidence: `02-jellyfish-heart/jellyfish.py`)
- Pair simulation → Bell geometry: uses geometry (evidence: `02-jellyfish-heart/source/duet.py`)
- Pair simulation → Glyph projection: projects scene (evidence: `02-jellyfish-heart/source/duet.py`)
- Reef composition → Pair simulation: uses path (evidence: `02-jellyfish-heart/source/reef.py`)
- Reef composition → Glyph projection: paints glyphs (evidence: `02-jellyfish-heart/source/reef.py`)
- Reel renderer → Shoal motion: simulates motion (evidence: `03-shark-intercept/source/proto/shark_studies/cutoff_render.py`)
- Reel renderer → Swimmer dynamics: uses pose (evidence: `03-shark-intercept/source/proto/shark_studies/cutoff_render.py`)
- Reel renderer → Reel identity: uses identity (evidence: `03-shark-intercept/source/proto/shark_studies/cutoff_render.py`)
- Shoal motion → Swimmer dynamics: steps swimmer (evidence: `03-shark-intercept/source/proto/shark_studies/cutoff_motion.py`)
