Physics
Here we have demos related to physics.
Lens optics
Visualization of rays being refracted through a lens represented by two intersecting circles. You can move the center point of the rays.
The code can be seen here in the function demoLens.
Reflection and refraction
Visualization of reflection and refraction at a medium interface.
The code can be seen here in the function reflectionRefraction.