Creates efficient and visually interesting layouts for irregularly shaped objects
Uniquely Shaped Spaces is a 3D shelving generator that uses Simulated Annealing and Cellular Automata algorithms to optimize the placement of irregularly shaped objects.
- Simulated Annealing: Optimizes the placement of irregular objects on a grid
- Cellular Automata: Generates dynamic shelving between objects
- p5.js: Utilizes p5.js canvas for rendering and interaction
Objects are represented as grid-based outlines with padding, allowing for flexible and efficient storage arrangements.
Cellular Automata is used to grow shelving between objects
-
Setup Phase
- Precalculate all path scores and store in an array
- Initialize cells with growth options: Left, Up, and Right
- Each cell retrieves scores for potential growth paths
-
Step 1: Merge and Die Rules
- Merging occurs when two alive cells meet or pass by each other
- An alive cell dies when it meets a dead cell (simulating crowding)
-
Step 2: Eliminate Invalid Options
- Prevent backtracking
- Avoid growing through existing shapes
- Respect boundary buffer constraints
-
Step 3: Choose Growth Direction
- If only one valid option remains, select it
- Cells are attracted to dead cells of a different strain (prevents parallel paths)
- Preference given to easy paths (low values)
- Cells tend to maintain their current growth direction