Move the corners of the triangle to make your own kaleidoscope!
Or upload one:
You can get some especially interesting shapes if you make a really thin triangle.
The code works by taking the canvas and folding the outside-the-triangle part along each of the triangle edges (in order, repeatedly) until the entire canvas is inside the triangle. Then it prints the triangle image and displays the unfolded image.
See the live source code here, especially the generateKaleidoscope() function.