Built with Processing
Caustics are the optical effects that occur when light gets bent several times by some refractive material. You can observe them for example on the bottom of a swimming pool or when light shines through a glass bottle. I find the resulting shapes very attractive so I have tried to create a tool which allows me to create and explore caustics or rather pseudo-caustics.
The algorithm I have written to accomplish this probably works very different to those that get used by conventional ray-tracers - especially as in my version there is no 3D involved at all: I shoot millions of "photons" or "light rays" at a 2D Perlin-Noise field and depending on the intensity of the field at the point of collision the ray gets reflected in a certain angle. It travels on some distance and then collides again with the noise field from where it gets reflected again. After a set amount of collisions it will end up on some position on the screen. I repeat this with millions of particles that get launched from different positions and at different angles and end up with the results you can see here.
It takes a while until the image becomes detailed enough to please the eye. So in order to quickly see if the selected setup looks promising the rendering starts pretty coarse and gets refined with each loop. If the screen stays black, the settings were probably not ideal, just click space to start a new rendering. if there is only a part of the canvas filled with shapes, try moving around the light cone by using they arrow keys together with the SHIFT key.
There are many variables that can be changed to give a different appearance, use the Keyboard to change them (you will probably have to click on the applet once in order to give it the keyboard focus)
[space] - start new rendering with random values
arrow keys - move view around left, right, up and down
[SHIFT] + arrow keys - move light cone around
[+] - zoom in
[-] - zoom out
 - random simple colorscheme
 - random wild colorscheme
[G] - cycle through some preset colorschemes
[P] - pause rendering
[M] - toggle render mode (cartesian/polar)
[B]/[SHIFT-B] - increase/reduce amount of bounces
[A]/[SHIFT-A] - rotate light angle clockwise/counterclockwise
[L]/[SHIFT-L] - increase/reduce light ray length
[R]/[SHIFT-R] - increase/reduce noise "refraction"
[O]/[SHIFT-O] - increase/reduce ray angle change after each bounce
[N]/[SHIFT-N] - increase/reduce ray length after each bounce
[F]/[SHIFT-F] - increase/reduce size of cone of light
[D]/[SHIFT-D] - increase/reduce amount of Perlin noise octaves
[Z]/[SHIFT-Z] - increase/reduce Perlin noise falloff
[T]/[SHIFT-T] - increase/reduce lower intensity threshold
[U]/[SHIFT-U] - increase/reduce upper intensity threshold
[X]/[SHIFT-X] - increase/reduce focus