CodeMonte-Carlo ray tracing · optics
photon-trace
A small Monte-Carlo ray tracer for a cross-section of a deep-UV LED: TE/TM dipole emission, Fresnel reflection and total internal reflection, running live in the browser.
- My role
- Author
- Built with
- TypeScript, SVG
top —sides —absorbed —
Emission
TM emission is sampled from a sin²θ pattern about the c-axis and TE from (1 + cos²θ)/2, by rejection sampling.
Interfaces
At every boundary the ray reflects with the s- or p-polarized Fresnel probability, refracts by Snell's law, or is totally internally reflected.
What it shows
With vertical sidewalls, roughly 1% of TM light leaves through the top while a fifth escapes through the sides, which is the point of the sidewall-recovery question.
Keep exploring