ORIGAMI

var cp = new CreasePattern()
cp.fishBase()

This is a planar graph javascript library for creating origami crease patterns

Graphs

Origami crease patterns are modeled on planar graphs, which are graphs (nodes & edges) in 2D space

planarGraph.getEdgeIntersections();

Explore the sections in detail: Graphs, Planar Graphs, Crease Patterns for more information and visual examples of code.

Playgrounds

 

Crease Pattern Validator

Check if your crease pattern is flat-foldable, and see a flat-folded approximation

Crease Pattern Editor

Add/remove creases, see a folded-form approximation, import and export SVG files

Path Simplify

This contains an path-walking algorithm that will merge as many individual lines into few polylines

Reference Finder

Visualize all crease lines made possible by axioms 1-3 in an attempt to locate a point of your choosing

Wiggle

This will identify crease intersections which do not satisfy flat-foldability and attempt to wiggle vertices around until the condition is met

Much of this work is still in progress!

About

This is in development

These docs make heavy use of paper.js, d3.js, and p5.js. Thank you developers.

This libary is available under the MIT open source license.