Blender for optical modeling II
Blender Cycles is decent at rendering some optical effects.

This is an example of Total-Internal-Refraction simulation. This is done by placing a light source close to one end of some tubes set to a +IOR.


Source File for Fiber Optics

This is an example of (heart) shaped bokeh by placing a cutout in front of the Blender camera. (There is no lens simulation)



Source File for Shaped Bokeh