mikolalysenko/orthogami
mikolalysenko/orthogami has 290 GitHub stars and 24 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-17 20:24 UTC. Last push 2014-12-25.
Measured star growth
- in 24h
- 0
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
About
Orthogonal polyhedra origami
Developer ToolsREADME.md
Originalorthogami
Turn voxel models into foldable origami! For example, you can turn this mario model:

Into this foldable model:
If you want to try making a Mario yourself, here is a PDF in A4 format.
This module works in any reasonable CommonJS environment (includes node.js and browserify). You can also use it with the voxel critter creator (select "Export Orthogami").
Example usage
//First create a voxel set
// 0 = empty
var voxels = require('ndarray-pack')([
[[0, 1],
[2, 3]],
[[0, 0],
[0, 4]]
])
//Require the module (works with browserify)
var orthogami = require('orthogami')
//Set up options (can skip this if you like)
var options = {
units: 'mm', //Units
bounds: [210, 297], //Page size
scale: 10, //Size of voxel
lineWidth: 0.1 //Size of dashed line
}
//Then run orthogami
var svgs = orthogami(voxels, options)
//Print out the result
var fs = require('fs')
svgs.forEach(function(svg, idx) {
fs.writeFileSync('page' + idx + '.svg', svg)
})
Output
Page 1:
Page 2:
Install
npm install orthogami
API
require('orthogami')(voxels[, options])
Generates an origami template for folding a model from the given voxel object.
voxelsis a 3D ndarray of integer values.0values indicate empty voxels.optionsis an optional object containing any of the following extra parameters:colorMapa function mapping color values in the voxels to SVG color names, or alternatively an array of SVG color names.boundsa 2D array representing the size of each page (default[Infinity, Infinity])scalea number giving the size of each voxel (default64)convexColorthe color of the convex creases (default'black')concaveColorthe color of the concave creases (default'white')tabColorthe color of the tab lines (default'black')lineWidththe width of the crease lines (default1)unitsthe units for the coordinate system (default'px')
Returns An array of SVG files encoding the pages of the origami printout
Credits
(c) 2014 Mikola Lysenko. MIT License