Conway game of life simulation on surface of a torus.
At core it maps a 2D grid to torus surface coordinates by first calculating radial coordinates then converting to position vector using torus parameterization
Next important part is cell surface orientation by calculating surface normal and tangent vector.
The project uses threejs for creating 3D torus, cell meshes and dynamic camera view.
The project uses vite. Run the following commands to get it running locally.
git clone git@github.com:rankdim/torus.git
cd torus
npm install
npm run devThere's big scope for optimizations and many low hanging fruits
Currently the grid size is manually adjusted to make the cell segment closer to square, we should be able to calculate it automatically.
Your can also contribute interesting patterns.