peey / Origami

planar graph library for representing crease patterns and performing origami operations

Home Page:http://rabbitear.org/docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Origami Code

This is a Javascript library for creating origami crease patterns.

First time visitors there are a few ways to get acquainted:

Usage

Include rabbit-ear.js

A data model of a crease pattern is initialized like so

var cp = new CreasePattern();

If you are in the browser, initialize an OrigamiPaper object and you also get an SVG visualization of the Crease Pattern.

var origami = new OrigamiPaper();

There are functions for checking local flat-foldability, Kawasaki-Justin's theorem, Maekawa's theorem, exposing the planar graph data structure. Everything is built on a custom geometry module giving the user control over the epsilon value for all adjacency or intersection calculations, useful for .svg file import. This library supports .fold, .oripa, and .svg file formats for import and export.

check out the introduction and tutorial for detailed usage notes.

Build

from the project root directory, compile source files using rollup: rollup -c

License

MIT open source software license

About

planar graph library for representing crease patterns and performing origami operations

http://rabbitear.org/docs/


Languages

Language:JavaScript 91.7%Language:Hack 3.6%Language:CSS 3.4%Language:HTML 1.3%