nvsriram / imaginary-cube

3D visualizer of imaginary cubes and their fractals

Home Page:https://imaginary-cube-visualizer.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

banner

A 3D visualizer of various imaginary cubes and their fractals.

πŸ’‘ Inspiration

  • I recently came across this video by Ben Gobler that provides a very succinct yet entertaining introduction into the world of imaginary cubes. It talks about Hideki Tsuiki's work on imaginary cubes and how one could generate your own imaginary cube fractals.
  • In Hideki Tsuiki's words, an imaginary cube is "an object that has square silhoettes in three orthogonal directions." "We call such an object an Imaginary Cube because it let you imagine a cube determined by the three silhouettes."
  • This got me thinking: what if I could visualize this without having to 3D print it?
  • This idea, coupled with my recent interest in three.js, got me reading more on the subject, figuring out what shapes work and how they could be rotated to work, until eventually deciding to make my own visualizer for the same.

πŸš€ Demo

imaginary-cube-demo.mp4

✨ Key Features

  • GUI to extensively configure all aspects of the cube fractal
  • Fractal size and interation control
  • Shape rotation with speed control to view the shadows formed
  • Camera rotation to explore the fractals from different perspective
  • Latin square depth visualization to view underlying fractal latin square
  • Scene reset support in case you tread too far
  • Shape randomization support for inspiration
  • Pause screen with keyboard support in case you want to take a break
  • Experimental Ξ² shapes to try out the non-obvious imaginary cubes
  • URL Search parameter support to easily share configurations

πŸ’» Tech Stack

  • React-Typescript Vite application with Tailwind CSS for styling
  • Leverages React Three Fiber and Drei for 3D rendering and scene controls
  • Utilizes Leva GUI for adding the imaginary cube fractal controls
  • URL state managed by React Router v6
  • Custom prettier and eslint config including route alias and sorted imports

πŸ§‘β€πŸ’» Getting Started

  1. Install the dependencies: npm install
  2. Run the development server: npm run dev
  3. Navigate to the server (defaults to http://localhost:5173)

About

3D visualizer of imaginary cubes and their fractals

https://imaginary-cube-visualizer.vercel.app

License:Apache License 2.0


Languages

Language:TypeScript 91.9%Language:JavaScript 6.9%Language:HTML 0.8%Language:CSS 0.4%