Example: expand a 4 mm beam to 12 mm
Assume the stated dimensions are 1/e² beam diameters, so the input radius is 2 mm and the target radius is 6 mm. The required magnification is therefore 3×. A practical stock-like Keplerian pair is 50 mm and 150 mm. For collimated input, the ideal afocal separation is f1 + f2 = 200 mm. The output divergence is approximately one third of the input divergence.
The focal-length ratio is only the start. A useful design must also check the wavelength, the beam's complex q parameter at the first lens, the radius on every optic, and whether the second lens has enough clear aperture. A 12 mm output beam generally calls for a substantially larger optic than a 12.7 mm nominal lens because Gaussian tails extend beyond the 1/e² diameter.
Fast agent workflow
- Read the current workspace or create an authored compact system.
- Compute the magnification before selecting lenses.
- Prefer common focal lengths such as 25, 50, 75, 100, 150, 200, or 250 mm before proposing an oddly precise value.
- Use an expression for the separation so the afocal relation stays explicit.
- Preview the candidate immediately, then refine only if the solved output misses the target.
{
"wavelength": {"value": 1064, "unit": "nm", "fixed": true},
"optical_chain": [
{"stage": 0, "type": "gaussian_beam", "parameters": {
"w0": {"value": 2, "unit": "mm", "fixed": true},
"dz": {"value": 0, "unit": "mm", "fixed": true}}, "resultingBeam": {}},
{"stage": 1, "type": "lens", "parameters": {
"f": {"value": 50, "unit": "mm", "fixed": true}}, "resultingBeam": {}},
{"stage": 2, "type": "lens", "parameters": {
"f": {"value": 150, "unit": "mm", "fixed": true},
"dz": {"unit": "mm", "fixed": true, "expr": "l1_f + l2_f"}}, "resultingBeam": {}}
]
}
Use the planner to inspect the entire envelope. An MCP-capable client can call validate_optical_system and simulate_optical_system; an internet-capable agent connected to a workspace can use the Direct Agent Bridge. A catalog search is optional and should happen only when the user requests real purchasable components.
DiffBeam does not host or proxy a language model. It supplies deterministic Gaussian beam validation, solving, and visualization, while the user's chosen AI explains the trade-offs.