Haskell, Lasers, and Curved-Fold Origami

About a year ago I wrote about some cool curved-fold origami patterns that make circular saddle shapes when they’re folded. Recently, I was back in Toronto, and while I was meeting my friend Chris, we used the CNC laser cutter at hacklab.to to make some more of these patterns, but with the laser to do the work of precisely scoring all the folds.

Lasergami I

Lasergami II

To make these, we generated some circular patterns and wrote out GCode that the laser at the Hacklab can read, like so:

import Definitions
import PolylineFormats

-- makes a circle of radius r, in millimeters
circle :: Float -> Polyline
circle r = [(r*cos (i*2*pi/nPts), r*sin (i*2*pi/nPts)) | i <- [0..nPts]]
           where nPts = 128.

main :: IO ()
main = do
    let writeCircles filename rs = writeFile filename $ hacklabLaserGCode
                                                      $ map circle rs
    writeCircles "outOdd.ngc"  [105,115..225]
    writeCircles "outEven.ngc" [100,110..220]
   

Here we’re using some of the libraries from ImplicitCAD, but with the imports relativized, since I don’t have a working Cabal installation on my Chromebook. When we score the paper with the laser, it makes a mountain fold, and since we’re trying to pleat the paper, we need to do one pattern on each side. So we generate a set of odd-numbered rings and a set of even-numbered rings. It would also be interesting to try experiments with unevenly spaced rings (here they’re all 5mm apart) or moving the rings so that they’re offset instead of perfectly concentric.

Since we’re cutting on both sides, we need to flip the paper while keeping it in the exact same place. Our solution was to score the odd side (with the outer ring) first, and increase the laser power to cutting strength for the last ring. Then, we hold the rest of the sheet in place and flip the disc over into the same hole.

Folding the scored pattern is fairly time-consuming, but not especially difficult. It’s best to work inward from the outside, folding one pleat at a time. Folds along curved lines cause bending in the paper and vice versa, so gently bending the paper as you fold it can help the pleats to pop into the right shape. If you’re curious about the shape, there’s a bit more detail in my post from last year.

Posted August 4, 2013 under origami, lasers, art, math, planetkde.