Git Product home page Git Product logo

ndimensions's Introduction

Netlify Status License: MIT

Tesseract Visualizer

I created this visualization as an extra credit project for the multivariable calculus class I took in the fall of my senior year of high school.

A tesseract is essentially a 4D cube; what you see on the website is a visualization of the points of the tesseract undergoing two perspective projections: once from 4D into 3D, and again from 3D into 2D (which you see on your computer screen!)

demo gif

The graphics were created with p5.js. I did not use the library's built-in WebGL 3D renderer. Rather, everything you see is represented by 2D shapes, the positions and scales of which I calculated manually (for whatever reason, doing something like this has been on my bucket list).

Website

The site is live at https://tesseract22.netlify.app! Feel free to visit and try it out.

Parameters

  • Speed - Drag the slider to control the rate at which the rotations are occurring.
  • Rotation Axes (3D cube only) - Enable or disable axes about which to rotate the cube.
  • Rotation Planes (4D tesseract only) - In 4D, we can't really rotate about a singular axis. Instead, we rotate about a plane. Each rotation is represented by a 4x4 matrix. By checking a box, you add a rotation matrix to a list of matrices to be composed—the resulting matrix product is applied to all the points of the tesseract prior to projection.

Tech Stack

As mentioned, the animation itself is rendered with p5.js. The website was programmed with Create React App and TypeScript. For CSS, I used Emotion in the styled flavor.

Acknowledgements

The code was inspired in part by Daniel Shiffman's YouTube video on 3D projection. I didn't actually realize he had another video on 4D projection until I was well into the project—but proved to be useful during my myriad sanity checks.

License

MIT

ndimensions's People

Contributors

ecuber avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.