Interactions Module

Ray-Surface Interactions

Handles the physics of ray-surface interactions including reflection, refraction, and intensity updates based on Fresnel equations.

At each interface, rays are split into reflected and refracted components with intensities determined by the Fresnel equations. This properly models the physical behavior where light partially reflects and partially transmits at each interface.

Functions

process_surface_interaction

Process rays intersecting a surface (generates both reflected + refracted rays)

reflect_rays

Apply reflection to rays at surface (modifies rays in place)

refract_rays

Apply refraction to rays at surface (modifies rays in place)

trace_rays_multi_bounce

Trace reflected rays through multiple bounces (legacy, reflected-only tracing)

trace_rays_with_splitting

Trace rays with proper Fresnel splitting (both reflected AND refracted rays)

References