Rendering Gaussian beamlets
Gaussian beamlets are drawn as a mesh of their 1/e² intensity envelope, one mesh for all segments of a beamlet (or of a group of astigmatic beamlets). live_render! draws the same mesh and updates it after a solve, see Live rendering. With show_beams = true, the chief, waist and divergence rays that generate the beamlet are drawn as well. Example renderings can be found in the Stigmatic beamlets and Astigmatic beamlets sections.
Stigmatic Gaussian beamlets
BeamletOptics.render! Method
render!(ax, gauss::GaussianBeamlet; kwargs...)Render the 1/e² envelope of the GaussianBeamlet into the specified axis, all segments as a single mesh.
With show_beams = true the generating rays are overlayed into the axis as follows:
chiefbeam: reddivergencebeam: greenwaistbeam: blue
Keyword args
show_beams = false: plot the generating rays of theGaussianBeamletshow_pos = false: withshow_beams, marks the positions of the generating raysflen = 0.1: length of the final beam in case of no intersectionr_res::Int = 50: radial resolution of the beamz_res::Int = 100: resolution along the optical axis of the beam
Makie kwargs
color = :redtransparency = true
Additional kwargs are passed into the mesh plot of the Gaussian envelope.
sourceAstigmatic Gaussian beamlets
BeamletOptics.render! Method
render!(ax, agb::AstigmaticGaussianBeamlet; kwargs...)Render the 1/e² envelope of the AstigmaticGaussianBeamlet as a smooth 3D surface, all segments as a single mesh.
With show_beams = true the generating rays are overlayed into the axis as follows:
chiefbeam: reddivergencebeam: greenwaistbeam: blue
Keyword args
show_beams = false: plot the generating rays (chief, waist, divergence)show_pos = false: withshow_beams, marks the positions of the generating raysshow_waist = false: marks the vertices of the envelope, i.e. the ellipses along the beamflen = 0.1: length of the final beam segment in case of no intersection [m]z_res::Int = 100: longitudinal resolutionr_res::Int = 64: radial (angular) resolution
Polarization kwargs
show_polarization = false: overlay the E-field curve along the chief raypol_λ = nothing: visualization wavelength [m], default = total plotted length / 20. This is a plotting parameter, not the physical ray wavelength; the curve shows thet = 0snapshotRe{E⊥·exp(i·k·s)}along the accumulated optical paths. Gouy phase and phase-front curvature are ignored; the curve is a qualitative visualization only. Values finer thanplotted length / 2000are clamped with a warning.pol_scale = 1.0: curve amplitude as a multiple of the mean 1/e² beam radius at the start of the beamlet (at the maximum |E⊥|)pol_focus_exponent = 1.0: the amplitude follows the on-axis field amplitude,(A_ref / A(z))^(pol_focus_exponent/2)withA = wx·wy.1is the physical scalingE ∝ √(w0x·w0y / (wx·wy)), which raises the curve in the focus; values in(0, 1)compress the gain for tight foci,0gives a constant amplitude.pol_gain_max = 10.0: upper bound on the focus gain, in multiples of the reference amplitude at the start of the beamlet. The curve saturates at this value rather than leaving the scene when the beam focuses tighter downstream than its input waist.pol_ppl = 32: sample points perpol_λalong the curvepol_color = :crimson: field curve colorpol_linewidth = 2.0: field curve line width
Makie kwargs
color = :redtransparency = truemarkersize = 10: size of the points ofshow_waist
Additional kwargs are passed into the mesh plot of the envelope.
sourceGroups of astigmatic beamlets
BeamletOptics.render! Method
render!(ax, bg::AstigmaticBeamGroup; kwargs...)Renders every render_every-th beamlet of the BMO.AstigmaticBeamGroup like render!(ax, agb::AstigmaticGaussianBeamlet); the envelopes of all rendered beamlets are merged into a single mesh.
Keyword args
render_every::Int = 5: renders only every e.g. fifth beamlet of the groupr_res::Int = 64,z_res::Int = 100: resolution per beamlet
All other kwargs of the BMO.AstigmaticGaussianBeamlet method apply with the same defaults.