L-SURF Documentation
L-SURF (Light Surface Reflections) is a GPU-accelerated physically-accurate raytracing framework for simulating light-surface interactions with ocean wave surfaces.
Key Features
Fresnel reflection and refraction - Physically accurate polarization-dependent coefficients
Multiple scattering - Multi-bounce ray tracing with intensity splitting
Ocean wave surfaces - Gerstner wave modeling with curved Earth geometry
GPU acceleration - CUDA-accelerated via Numba for high-performance simulations
Wavelength-dependent materials - Sellmeier and Cauchy dispersion models
Polarization tracking - s and p polarization component handling
Quick Start
Installation:
pip install lsurf
Basic usage:
import lsurf as sr
# Create a water surface
surface = sr.PlanarSurface(
point=(0, 0, 0),
normal=(0, 0, 1),
material_front=sr.AIR_STP,
material_back=sr.WATER,
)
# Create a collimated beam
source = sr.CollimatedBeam(
center=(0, 0, 0.1),
direction=(0.707, 0, -0.707), # 45° incidence
radius=0.01,
num_rays=1000,
wavelength=532e-9,
)
rays = source.generate()
# Process reflection/refraction
reflected, refracted = sr.process_surface_interaction(
rays, surface,
wavelength=532e-9,
generate_reflected=True,
generate_refracted=True,
)
Table of Contents
User Guide
API Reference
Development