Caustic Lens Generator

Turns a grayscale image into a 3D-printable refractive lens that draws the image with sunlight (Schwartzburg et al. 2014, High-Contrast Computational Caustic Design). Everything runs in your browser: the optimal-transport and surface solvers are the original C++ compiled to WebAssembly. Nothing is uploaded.

Target image

input (centre-cropped to a square)
light pattern the lens will draw
Load an image to start.

Detail needs sites: the transport map can only resolve features larger than one site cell, so a pattern with n lines across needs roughly (2n)² sites. 5000 sites / mesh 128 matches the desktop pipeline (≈8–12 min in the browser); 1000 sites / mesh 64 finishes in a minute but only reproduces coarse shapes.


  

Result

Lens relief height map (bright = thicker). Flat entry face on top, relief underneath; light enters the flat face.

No lens generated yet.