Introduction to 3D Ray Tracing
Ray tracing models light as rays propagating through 3D space. It is ideal for devices with non-planar or microstructured geometries (e.g., microlens arrays, textured substrates, light-extraction features) where wave-optics thin-film assumptions no longer hold.
A ray is parameterized by a point \(\mathbf{r}_0\) and a unit direction \(\hat{\mathbf{d}}\):
On hitting a surface with unit normal \(\hat{\mathbf{n}}\), the perfectly specular reflection direction is
3D Snell’s Law (Vector Form)
Let \(n_1\) and \(n_2\) be the refractive indices of the incident and transmission media, respectively. Define \(\eta = \dfrac{n_1}{n_2}\) and \(c = -\,\hat{\mathbf{n}}\!\cdot\!\hat{\mathbf{d}}\) (the cosine of the incidence angle, using the convention that \(\hat{\mathbf{n}}\) points into medium 1). Then the refracted (transmitted) unit direction \(\hat{\mathbf{d}}_{\mathrm{refr}}\) is
The square-root argument enforces the physical constraint from Snell’s law, \(n_1 \sin\theta_1 = n_2 \sin\theta_2\). If
then no real solution exists and the ray undergoes total internal reflection (TIR); in that case, use \(\hat{\mathbf{d}}_{\mathrm{ref}}\) above.
Energy Partition (Optional)
To split energy between reflection and transmission, use Fresnel coefficients (unpolarized average):
where \(c' = \sqrt{\,1 - \eta^{2}\,(1-c^{2})\,}\) is \(\cos\theta_2\). In absorbing media, use complex refractive indices \(n = n' + i\kappa\).
Typical Uses
- Light extraction in OLEDs with patterned substrates
- Scattering/trapping in textured or micro-structured solar cells
- Coupling into waveguides and lenslet arrays
- Packaging losses and stray-light analysis in 3D devices