A reactive engine for algorithmic intuition
Pattern Studio is built around one idea: a visualization should be a pure function of state. Compile an algorithm into an ordered list of self-describing frames, and playback, animation, and code-sync all fall out for free.
Frame-driven, not imperative
Each pattern deterministically turns an input into a list of frames. A frame is a complete snapshot — array cells, pointers, window, graph, stacks, variables, the executing code line, and narration. Rendering the current frame is stateless, so stepping, scrubbing, and rewinding are trivial and fully reversible.
Plugin architecture
Every visualization implements a single interface — validate input, then generate frames. Reference implementations in four languages and a declarative control spec live alongside. Registering a plugin is a one-line change; the explorer, playground, and roadmap discover it automatically.
One visual language
A shared semantic palette maps roles like active, comparing, visited, frontier, and answer to consistent colours. Whether you are watching an array cell, a graph node, or a stack frame, the same colour always means the same thing — so intuition transfers between patterns.
The plugin contract
interface PatternPlugin {
meta: PatternMeta;
code: Record<Language, CodeSnippet>;
controls: ControlSpec[];
defaultInput: PatternInput;
validateInput(input): ValidationResult;
generateFrames(input): Frame[];
}