How timhutton/crochet-simulator works
Purpose and delivery
This repository is a browser-based crochet-pattern simulator: it predicts and visualizes the 3D form implied by a compact crochet notation. The deployable application is a single static HTML entry point, suitable for GitHub Pages.
• Entry point and complete application container: index.html
• Project intent and example pattern URLs: README.md
Runtime model
The application runs entirely client-side in a web browser. Pattern state is encoded in the URL query/hash-style suffix used by the demo links, enabling shareable simulations without a backend.
• Browser document, UI, parsing, simulation, and rendering are consolidated in index.html
• No server-side runtime, build system, package manifest, or separate source directories are present in the supplied tree.
Pattern input boundary
Crochet instructions are supplied as compact textual patterns, such as sc, parenthesized sequences, and repetition counts. The README demonstrates patterns for cylinders, spiral discs, granny squares, and negatively curved surfaces.
• Input conventions and representative payloads: README.md
• Browser-facing pattern ingestion implementation location: index.html
Simulation pipeline
The core conceptual pipeline is:
1. Read the pattern from the URL/default demo state.
2. Parse stitch and repetition notation into an ordered crochet structure.
3. Convert that structure into geometric/topological constraints.
4. Solve or relax the structure into a predicted 3D shape.
5. Render the resulting form interactively in the browser.
All executable stages are necessarily colocated in index.html; there are no separable modules in this repository snapshot.
Visualization and interaction
The browser UI presents the simulated geometry and likely accepts or reflects the active pattern through URL state. Demo links act as externalized presets: loading a URL selects a pattern and displays its resulting shape.
• Application page and visualization surface: index.html
• Preset/demo definitions and intended shapes: README.md
External boundaries
There is no application API, database, queue, authentication layer, or deployed service integration indicated by the repository. The material external dependencies are static hosting and browser capabilities; published demos are hosted at timhutton.github.io/crochet-simulator.
• Hosting-facing repository entry: index.html
• Documentation links to hosted demos and related research: README.md
Main entry points: index.html Pattern URL state · README.md Patterns and demo presets
Components 12
Browser application
All runtime stages are colocated in the static page.
- Web browser · Provides URL state, UI, and rendering capabilities.
- Simulator page · Complete client-side application container.
index.html - Pattern URL state · Shareable query/hash-style pattern payload.
index.html - Pattern parser · Parses stitches, groups, and repetition counts.
index.html - Ordered crochet structure
index.html - Geometric constraints · Converts crochet structure into topology and geometry constraints.
index.html - 3D shape solver · Relaxes constraints into a predicted form.
index.html - Simulated geometry
index.html - Interactive renderer · Displays the predicted form in the page.
index.html - Simulation UI · Reflects the active pattern and rendered result.
index.html
Documentation
- Patterns and demo presets · Documents notation, representative patterns, and demo URLs.
README.md
Other components
- Static hosting · Serves the single-page application.
Connections 12
- Static hosting → Simulator page: serves
- Web browser → Simulator page: loads
- Simulator page → Pattern URL state: reads
- Pattern URL state → Pattern parser: supplies pattern
- Pattern parser → Ordered crochet structure: produces
- Ordered crochet structure → Geometric constraints: drives
- Geometric constraints → 3D shape solver: constrains
- 3D shape solver → Simulated geometry: produces
- Simulated geometry → Interactive renderer: renders
- Interactive renderer → Simulation UI: displays in
- Simulation UI → Pattern URL state: reflects active pattern
- Patterns and demo presets → Pattern URL state: documents demo payloads