Laser Beam Optics API
Gaussian-beam laser-optics maths as an API, computed locally and deterministically. The beam endpoint propagates a Gaussian beam from its wavelength and waist radius: the Rayleigh range z_R = π·w₀²/λ and depth of focus, the divergence half- and full-angle θ = λ/(π·w₀), and — for a given distance — the beam radius and diameter w(z) = w₀·√(1+(z/z_R)²); an optional M² beam-quality factor scales it for real beams. The focus endpoint computes the diffraction-limited focused spot of a lens, w_f = λ·f/(π·w_in), with the depth of focus and the f-number, so you can size the spot a lens will deliver. The irradiance endpoint turns a beam power and spot size into the beam area and the average and on-axis peak irradiance (power density) in W/m² and W/cm². Wavelengths are in nanometres, sizes in millimetres or micrometres, distances in metres and power in watts. Everything is computed locally and deterministically, so it is instant and private. Ideal for photonics, laser-engineering, materials-processing and optics app developers, beam-delivery and laser-safety tools, and physics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is Gaussian-beam laser optics; for refraction use a Snell API and for thin-lens imaging a lens API.
api.oanor.com/laser-api