What Does It Look Like to be 10 Microns Tall: Diffraction and Interference Rendering
Overview
Classical ray tracing still uses the optics from the 1800s. Every piece of light travels along in a straight line and then is partially absorbed and partially reflected and partially transmitted. This type of model could not explain the phenomena noticed by Young with his double slit experiment. To explain this, wave optics was needed and the rays had to be treated as waves. I intend to bring this type of phenomena to the PBRT ray tracer.
Background
To correctly model all the real world light phenomena we would have to treat all light as waves. Thankfully there is something called Huygen's Principle. From the article: βIt recognizes that each point of an advancing wave front is in fact the center of a fresh disturbance and the source of a new train of waves; and that the advancing wave as a whole may be regarded as the sum of all the secondary waves arising from points in the medium already traversed.β
Under this model, we can simplify the modeling of the wave, using our old classical optics. We can trace rays in the world classically, and then when classical optics doesn't hold anymore we can treat any point on the ray as a new source and ray trace accordingly.
Interference
Since we are modeling the rays as waves, they each have a phase associated with them. When two waves of the same phase coincide, they positively interfere and if they have opposite phases then they negatively interfere. There are some excellent pictures of this on Wikipedia
Interference of two circular waves - Wavelength (decreasing bottom to top) and Wave centers distance (increasing to the right). Absolute value snapshots of the (real-valued, scalar) wave field. As time progresses, the wave fronts would move outwards from the two centers, but the dark regions (destructive interference) stay fixed.
Diffraction
Diffraction has been modeled before for surface interactions. This has been used to model thin-film phenomena butterfly wings, soap bubbles, and snake scales to mention a few. I intend to model the diffraction that occurs at edges. This is similar to how sound can bend around walls as well as radio station signals. Again I point to Wikipedia for information on this subject.
Implementation
I first intend to model interference of the light waves. I will add a phase parameter that ranges from 0 to 2PI that represents the wave's phase. On any surface intersection I will compute how far the ray has traveled and change its phase accordingly. Each wave will also have to have a wavelength which defines how its phase changes in time as well as its color. I expect to follow the same procedure as some of my colleagues and split every light into a Monte Carlo spectrum emitter and then recombine the light values into their RGB. I only want to start off with a single wavelength of coherent light but I intend to model the full visible spectrum by the end.
To simulate diffraction, I intend to place a βdifractable mediaβ at the points where diffraction will occur. First these will be placed by hand, but might be programatically found if time permits. These will be modeled as PBRT surfaces and when struck will, in accordance with Hyygen's principle, act as tiny point light sources.
Desired Results
The first result I want to get is an interference pattern from a single slit or double slit experiment illuminated with monocromatic laser light. The pattern for a single slit diffraction should be a sinc squared function like this:
After getting this working, I intend to model a scene that has very small distances. This might also be achieved by increasing the wavelength of the light (AKA looking with radio waves or another long wavelength EMR spectrum). I haven't found any pictures of this, so I'm not really modeling it after any picture in particular
Second Project (Maybe)
Well, the whole goal of this project is to do something cool in physics that isn't currently ray traced. One thing that my excellent roomate Bill recomended is to model dichroic surfaces. These are partially transmissive and paritally reflective based on wavelength. If I already have the wavelength depended infrastructure, I would like to model a dichroic surface. Here is an example:
Notice how it reflects blue light and transmits red. Another example is this:
When it is on a black surface, only the reflected light comes to the eye but when it is put on paper the transmitted light and the reflected light will come through, giving a whiter looking light (it isn't a perfect spectrum decomposition so it isn't pure white that the light back) (The lines are ceiling tile reflections).