How visuphy/gaussianbeam works
This is a browser-based Gaussian beam optics simulator. Users configure initial beam parameters and optical elements, run ABCD-matrix propagation, inspect the beam envelope and system parameters in a canvas, plots, and table, then export w(z) and R(z) data as CSV. The main computation and interface logic share script.js, while interactiveCanvas.js handles drawing and drag interaction. README-described plotting and configuration capabilities are included; unsampled implementation details are represented at the enclosing source-file level.
Main entry points: script.js Beam Propagation · interactiveCanvas.js Canvas Controller · index.html Beam Plots
Components 15
System Configuration
- Simulator Page
index.html - Beam Parameters
script.js - Element Editor
script.js - Optical System State
script.js
Beam Simulation
- ABCD Element Models
script.js - Beam Propagation
script.js - Beam Metrics
script.js
Visualization
- Canvas Controller
interactiveCanvas.js - Interactive Canvas
index.html - Beam Plots
index.html
Results and Export
- System Table
index.html - CSV Export
script.js
Other components
- Optics User
- Plotly.js
- Browser Download
Connections 17
- Optics User → Simulator Page: opens
README.md - Optics User → Beam Parameters: configures
README.md - Optics User → Element Editor: edits elements
README.md - Beam Parameters → Optical System State: updates
README.md - Element Editor → Optical System State: updates
README.md - Optics User → Optical System State: drags elements
README.md - Optical System State → Beam Propagation: simulates
README.md - Beam Propagation → ABCD Element Models: applies matrices
script.js - Beam Propagation → Beam Metrics: derives parameters
README.md - Beam Propagation → Canvas Controller: provides plot data
script.js - Canvas Controller → Interactive Canvas: draws
README.md - Canvas Controller → Beam Propagation: requests update
interactiveCanvas.js - Beam Metrics → Beam Plots: supplies results
README.md - Beam Plots → Plotly.js: renders with
README.md - Beam Metrics → System Table: summarizes
README.md - Beam Metrics → CSV Export: exports data
README.md - CSV Export → Browser Download: downloads file
script.js