Skip to content

DigiMancer3D/omni_shapes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Omni Shapes: Unlock Infinite Patterns in Polyominoes & Beyond! 🚀

GitHub license GitHub stars GitHub issues GitHub forks Contributors welcome

Play the Demo Now! 🎮
Dive right in and start building shapes interactively: Try Omni Shapes Live
    Live Demo May Not Reflect Most Recent Build Version
(Pro Tip: Enable GitHub Pages on this repo for a direct link like https://digimancer3d.github.io/omni_shapes/omni_shapes.html)

Welcome to Omni Shapes, your gateway to exploring "Omni Shapes" — a revolutionary coordinate-based system for polyominoes and multi-dimensional puzzles! Forget rigid matrices; we use relative coordinates for effortless rotations, mirrors, and jumps to 3D/4D. Perfect for puzzle lovers, coders, and math wizards.

If you're excited about algorithms, geometry, or hacking on open-source fun, fork this repo and join the adventure! We've got bugs to squash, features to add, and shapes to discover. Let's collaborate and expand the universe of patterns together. 🌌


📑 Table of Contents


🌟 Overview

Omni Shapes flips the script on polyomino discovery by using relatable coordinates over visual grids. Start with a base, track position changes, and boom — shapes that rotate, mirror, and scale to higher dimensions effortlessly.

Think: A 2D "L" shape as (4,4) [+0,-1] [+0,-1] [+1,0] (5,2). This unlocks "free" polyominoes without symmetry headaches.

Our web tool (omni_shapes.html) lets you build on a grid, enforce rules, spot alternatives, and generate mirrors in real-time. Ready to shape the future?


🛠️ How It Works

Powered by HTML, CSS, and JS, this interactive grid turns shape-building into a game. "Clones" explore paths, colors guide moves, and math handles transformations.

Core Concept: Coordinate-Based Tracking

Ditch matrices — use change arrays: start [changes] end. Deltas (e.g., x,y) make transformations a breeze. Extend to 3D? Just add axes!

Grid Setup and User Interaction

JS builds a dynamic grid (default 9x9). Click to place, validate adjacency, and update visuals.

Color-Coding System for Click Allowance

  • Available: Adjacent, rule-compliant.
  • 🔵 Proofs: Proof Digits.
  • 🟡 Potential: Potential alt-moves.
  • 🟢 Placed: Your shape so far.
  • 🟣 Alt-Moves: Alt-Moves taken by system.

Simplifies logic with instant feedback.

Tracking Pick Numbers with DOM Variables

Picks start at 1, stored in data-pick attrs. Globals track state; proofs in data-proof limit futures.

Determining Alt-Moves (Missed Opportunities)

Scan adjacents, simulate clones for 1-step alternatives. (Deeper recursion? Coming soon!)

Mathematical Determination of Mirrored Position Graphs

Flip signs, swap axes, apply rotations (e.g., 90°: x=y, y=-x). Normalize for uniques — pure math magic!


🔥 Unique Systems and Functions

  • Proof Digits: Boundary trackers with dimensional twists.
  • Clone Simulation: Path exploration without commits.
  • Multi-Dim Extensions: Add axes seamlessly.
  • Pattern Swapping: Mix known shapes.

Key funcs: buildGrid(), handleCellClick(), findAltMoves(), generateMirrors() — modular for hacks!


🐛 Known Bugs

Find current bugs by searching "//BUG FOUND". Test_ver.html is the testbed for new ideas.

Potentials: High-dim overflows, large-grid perf, input validation.

Spot more? Open an Issue!


🚀 Desired Upgrades

Level up Omni Shapes:

  • Export/Import Shapes: JSON save/load for shape libraries. (Use Blobs/FileReader!)
  • Auto-gen all shapes to N, 3D viz (WebGL), AI suggestions.

Code snippet for export:

function exportShape() {
  const shapeData = { start: [4,4], changes: [[0,-1], [0,-1], [1,0]], end: [5,2] };
  const blob = new Blob([JSON.stringify(shapeData)], { type: 'application/json' });
  const url = URL.createObjectURL(blob);
  const a = document.createElement('a');
  a.href = url;
  a.download = 'omni_shape.json';
  a.click();
}

About

Let's try to find omni shapes or Polyominoes!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages