Illusion Garden
RUNS IN YOUR BROWSER
← Parallax Metrology portfolio
CONNECTED ARCHITECTURE / UNRELIABLE IMPRESSIONS

Every turn, another perspective.

A courtyard maze built around
the way you see.

Edit growth sample ↓
COURTYARD MAZECONTEXT ON
LAYING THE FOUNDATIONS
Growing…

Wander, observe, reshape. Enter the garden to explore. Freeze a favorite area, then regrow everything around it.

—reachable rooms
0WFC observations
—connected doorways verified

Paint a starting point. Choose Courtyard and click, or choose Draw path and drag. On release, the garden rebuilds around your plan. Explore a finished tile to inspect its illusion. Freeze preserves exact tiles; Enter the garden starts a walk.

ARCHITECTURE / PERCEPTION

Courtyard

HOW THIS PLACE GROWS

A connected plan.
A curious perspective.

Sample studio: paint a 5 × 5 material example, then choose Grow this example. Overlapping WFC learns every 2 × 2 patch with wrapping at sample edges, preserving direction and observed frequencies. Every output 2 × 2 material patch must occur in the example. Pins and frozen cells constrain this learning step. Door generation follows, retaining global connectivity. Samples describe material arrangements, not exact doorway shapes. Passage material includes paths, bridges, stairs, and arcades; open-floor patches can merge into grand courts. If rules conflict, generation stops with an explanation after at most 12 seeded attempts. Inspect a grown tile to compare its local pattern with the source.

Draft edits do not alter the current garden. Save plan includes both the applied sample and the current draft, alongside the exact architecture and exploration progress.

A seeded spanning tree supplies a connected route through every room. Your drawn paths become required connections; pinned courtyards and passages become required tile types.

Simple tiled Wave Function Collapse then chooses architectural variants, propagating edge constraints so every doorway matches its neighbor. Additional doors can create loops. Opposing context variants alternate across neighboring cells. The completed graph is checked for reachability from the entrance.

These are original top-down architectural tiles, with real connections and flat geometry. They are not an Escher projection or physically impossible 3D geometry.

Courtyards: each central medallion has radius 8. Surrounding planters change its apparent size, using the Ebbinghaus principle. Terraces and arcades: every brass threshold has length 36, with inward or outward fins following Müller-Lyer geometry. Straight passages: angled paving marks cross two parallel edges, following the Zöllner principle. Stairs supply architectural variation.

These are experimental compositions, not perceptually validated stimuli. The truth slider fades the contextual geometry and shows measurement marks while preserving the targets and the walkable plan.

Plan editing: Courtyard pins a room; Draw path pins passage tiles and required doors along your drag; Erase removes those requirements. Edits rebuild when you release the pointer. Clear pins starts a free plan. Undo restores the last plan. Keyboard: arrows move, Enter applies the current tool, Shift + arrows draw paths.

Collection and replay: Keep garden stores an exact snapshot with a thumbnail, sample drafts, frozen areas, walk progress, and recorded growth. My gardens lets you open, rename, export, and remove entries; the last removal can be undone. Up to 12 gardens are kept in browser storage, with a session-only fallback if storage is blocked or full. Export the collection to keep a portable backup. Import merges new entries without replacing existing IDs. Replay growth shows recorded sample and architecture states with a scrubber, frame steps, pause, and speed controls. Older saved plans without recordings need to be grown again to record a replay.

Walk mode: arrow keys, WASD, or touch buttons follow open doors. Visited rooms remain visible; adjoining rooms are previewed. Three experiment stations sit along the entrance-to-exit route. The notebook presents enlarged studies of the garden’s optical principles. Your first guess is recorded, then measurements are revealed. You can revisit completed experiments.

Freeze and regrow: Freeze area preserves a finished tile’s family, doors, and context. Selecting part of a grand court freezes the full room. Regrow unfrozen chooses a new seed and rebuilds around those exact constraints. Editing a frozen tile requires unfreezing it first. New sizes start a fresh plan. Regeneration restarts the walk and notebook.

Save plan includes the seed, size, pins, frozen architecture, required connections, truth setting, route visibility, and walk/notebook progress. The earlier overlapping pixel-sample engine remains available in Sample worlds.

FIELD NOTEBOOK / PERCEPTION EXPERIMENTS

Trust your first impression.

Three enlarged studies of the garden’s optical principles. Make a guess, then inspect the measurements.

YOUR GARDEN COLLECTION

Places worth returning to.

Your collection is empty. Finish growing, then choose Keep garden to save a favorite.

RECORDED GROWTH

Watch the garden find its shape.

This is a recording of the generator. Your garden and walk stay where you left them.

FIELD NOTES / OVERLAPPING WFC

Learn small.
Grow something larger.

1. A sample becomes a vocabulary.

The solver slides an N × N window over your sample, counting each unique pattern. Mirrored patterns can be included. It learns pixel neighborhoods—not prebuilt trees or finished tiles.

2. Each observation changes its neighbors.

Every location starts with many possible patterns. A low-entropy location collapses to one choice. Incompatible neighbors are removed, and that information travels across the world. The softened colors show the remaining possibilities, not a blur animation.

3. A whole structure emerges.

Matching overlaps preserve branches, corners, windows, and other local relationships. The seed makes each result reproducible. Local rules do not guarantee global connectivity or one continuous tree. Contradictions trigger a visible deterministic retry, up to 20 attempts.

4. Context changes what you see.

Blooms / Ebbinghaus: generated blossom sites get equal center circles with differently sized surrounding petals. Trellis / Zöllner: parallel rails get alternating angled cross-strokes. Gates / Müller-Lyer: equal shafts at generated sites get inward or outward fins. These render layers do not alter the WFC pixel structure. Reveal truth removes the context; Pixel build shows the untouched result.

Illusion geometry is adapted from Pyllusion. These compositions are artistic experiments, not calibrated perceptual tests. More context intensity does not guarantee a stronger perceived effect.

Entirely local.

This single HTML file includes all code and samples. No imports, fonts, network calls, account, or server. PNG saves the current view. Recipe files preserve the source pixels, generation rules, seed, and render settings.

Source attribution & licenses

The flower bitmap was extracted from your supplied wfc.gif, originally demonstrating mxgmn/WaveFunctionCollapse. Walled gardens and Window city are original sample sketches. Repository image samples are separate from its software license.

Solver: JavaScript adaptation of Model.cs and OverlappingModel.cs. Perception geometry: adapted from RealityBending/Pyllusion. The C# and Python runtimes are not required.

ILLUSION GARDEN — SOURCE ATTRIBUTION

Browser adaptations of:
• WaveFunctionCollapse: https://github.com/mxgmn/WaveFunctionCollapse
  Weighted-entropy observation and constraint propagation from Model.cs.
• Pyllusion: https://github.com/RealityBending/Pyllusion
  Parametric Zöllner, Ebbinghaus and Müller-Lyer geometry.

Original garden layouts, browser rendering and interaction are specific to this app.
These adaptations do not execute the upstream C# or Python runtimes.

MIT License

Copyright (c) 2016 Maxim Gumin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Provided image samples and tiles are not part of WaveFunctionCollapse software.


MIT License

Copyright (c) 2018 Dominique Makowski

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


ONE NEIGHBORHOOD, TWO PLACES

The little rule that fits.

The illusion layer can change how the world is drawn. This inspector always checks the underlying WFC pixels.