chriscow / cut-and-project-tiling

Cut-and-project tiling generator.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cut-and-Project Tiling

This applet is an interactive demonstration of cut-and-project tiling.

sample screenshot

Cut-and-project tilings are made by a 2-dimensional plane cutting through a higher dimensional square lattice. Lattice points in the neighborhood of the cutting plane are projected onto the plane and connected by edges to create the tiling. The well-known Penrose tiling is among the many tilings that can be generated this way.

Try it!

Explanation of controls and how it works.

Check out a small gallery of examples.

Requirements

This applet includes a WebAssembly implementation of the tiling generator. That piece is written in Rust and uses wasm-bindgen and wasm-pack to build the wasm module. Until browser support for wasm-modules-as-ES6-modules improves, the easiest way to use a wasm module is with a bundler like webpack.

Prerequisites:

  1. Install Rust and cargo

  2. Install node and npm

  3. Install wasm-pack

  4. Install project dependencies:

     npm install
    

To run dev server:

npm run start

To run dev server in debug mode:

npm run debug

To build for deployment (into dist subdirectory):

npm run build

Acknowledgments

I drew inspiration from Quasitiler. My favorite feature borrowed from it is the axis control rosette. Before that, I was trying to control the orientation of the cutting plane with angles, and Quasitiler's way is far superior.

About

Cut-and-project tiling generator.

License:MIT License


Languages

Language:JavaScript 76.1%Language:Rust 16.0%Language:HTML 4.4%Language:CSS 3.4%