f_caustic, live
An optical caustic: a lattice of glass samples is displaced through a vector field and each deposits the source's light, so the bright folded sheets appear where rays pile up.
The cell below steps the NumPy mirror that f_caustic's tests are written against, in your browser. It is the NumPy mirror, not the Max patch, and it is not claimed to match the patch bit for bit.
Downloads about 15 MB the first time (Python and NumPy).
sample densityis the lattice resolution: points per output pixel, both axes, like the module's fixed 2 points per pixel; higher numbers smooth the sheets and cost more.scaleis the propagation distance: how far each sample is pushed by the field before it lands; larger values fold the sheets over.gainbrightens the caustic layer before the tone curve.expois the tone-curve exponent; lower values compress the bright folds harder.mix_pctcrossfades from the bare source toward the composite of source plus caustic.edgedecides where a ray that lands outside the frame goes: off discards it with its light, wrap re-enters it, mirror reflects it, clamp piles it on the border.viewshows the composite or the isolated caustic layer.- The second input is the refracting field (vector field); try different fields to reshape the sheets.