This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.

Code optimisation by subpixel to allow faster drawing for realtime animation, animating the last fold over time and interactive with mouse movement.

Based on the fabulous Origami Butterfly by Kyle McDonald.

[space] to pause
[1]-[5] to switch the source image (with the same folding),
[f] to create a new folding (with a random number of folds),
[e] to display extra information: the folded paper and points used to animate the last fold.

A modification of the Origami Butterfly Method by Jonathan McCabe. The original algorithm can be paraphrased:

  1. Fold a piece of paper (a few times)
  2. Note the new position of each point on the paper
  3. Unfold the paper
  4. For each point, use the noted (folded) position to determine that point's color

The primary modification is the last step: instead of a point in color space, the positions represent a sample from an image space - painting some unexpected organic patterns, and leading to a simpler metaphor for the algorithm:

  1. Fold a piece of paper (a few times)
  2. Project an image onto the paper (like tie-dye)
  3. Unfold the paper

Performance metrics compared to original code (470x353, 32 folds). Note: these times are merely quickest times observed from debug output and are cumulative in the order presented.

An approximately 3x speed improvement overall, allowing for rendering as a realtime animation, especially with fewer folds.

Source code: spxlOrigamiButterfly

Built with Processing