OpticSketcher
Skip to main content
Documentation

User Guide

Everything about using OpticSketcher on desktop or tablet, from placing your first lens to building complete optical systems and sharing them with others.

Getting Started: Your First Optical System

This five-minute walkthrough builds a classic focusing setup: a collimated laser beam passing through a lens and landing on a sensor. No account is needed, so just open the workspace and follow along.

1
Add a light source
In the Parts Library on the left, click Source (a collimated beam by default; the Inspector's Source preset also offers Point, Gaussian beam and Gaussian point). It appears at the center of the workspace, already selected, and its rays are traced immediately. You never press a "run" button; the simulation is always live.
2
Add a lens
Click Lens in the library, or drag it from the library and drop it in front of the beam. The rays refract through it in real time and converge toward the focal point.
3
Position the elements
Drag the lens with the mouse to move it along the beam. Watch the focus shift as you move it. To move in a straight line, hold Shift while dragging to constrain movement to one axis. Drag the circular rotation handle around a selected element to rotate it. With a thin lens selected you can also drag its focal-point marker along the axis to change the focal length; the marker on the opposite side shows the second focal point.
4
Fine-tune in the Inspector
With the lens selected, the Inspector on the right shows all of its properties: focal length, diameter, thickness, glass material, lens shape and more. Type exact values or use the sliders, and the ray trace updates as you edit.
5
Add a sensor and inspect the result
Add a Sensor from the library and place it near the focal point. Select it and click Show in Sensors panel in the Inspector (or switch to the Sensors tab): each sensor card shows a live spot diagram of every ray hitting it, with intensity, wavelength and polarization statistics. You can reorder cards, pin any card as a resizable floating panel, or drag the left edge of the right panel to widen it.
Want a head start?
The Gallery contains ready-made classic systems: Keplerian and Galilean telescopes, a Newtonian reflector, a 4f relay, prism and grating spectrometers, a single lens versus achromat comparison, interferometers that open with Fields on, and more. In the workspace, File → Examples loads the same library (classic forms and tutorials) without leaving the editor. Open one and take it apart to learn how it works. You can also type a plain-text description into AI Scene Assistant (top of the Parts Library) and let the AI build the system for you.

Interface Overview

The workspace brings the parts library, a live canvas and the inspector together. The same scene can be viewed in 2D or 3D, and ray paths update as you edit.

Desktop workspace showing a Schmidt camera, with numbered interface callouts1234567
1Menus and project name: Rename the design and open File, Edit, View, Analysis or Help.
2Command bar: Frequent actions, global bench settings, Rays, Fields and Polarization, and command search.
3Parts Library: Add sources, optics and sensors; open the AI Scene Assistant.
4Canvas: Select, position and rotate components while following the traced rays.
5View controls: Choose Iso, Top, Front or Side; zoom or reset the view.
6Inspector: Select from the scene overview, edit properties and analyze the system.
7Share, Cloud and Theme: Create a share link, manage cloud designs or change the workspace theme.

Menus and command bar

  • File: New design, Open (Ctrl/Cmd + O), Save (Ctrl/Cmd + S), Save As (Ctrl/Cmd + Shift + S), Auto-save to file and Clear all; Save to cloud and My cloud designs; Import (ZMX, CODE V / OpTaliX, 3D CAD); Export (PNG, SVG, GLB, STL, PLY, OBJ and ZMX); Examples; and Account and About options.
  • Edit: undo and redo; cut, copy, paste and select all; duplicate, group, ungroup, lock and delete the selection; and search commands.
  • View: 2D / 3D mode, Bench settings, display options (grid, table holes, shadows, labels and display mode), section cut, the Measure tool (M) and panel visibility.
  • Analysis: control rays, polarization, Fields and live tracing, and, for pulsed sources, freeze the pulse clock; open sensor data when a sensor is selected.
  • Help: open the guide, tips, keyboard shortcuts and What's New.
  • Command bar: use Undo / Redo and 2D / 3D directly. Select Units, Axis height, Default λ, Snap or Grid to open global settings. Rays controls visibility; Fields shows the computed field; Polarization controls markers; Live controls tracing while editing (Freeze appears when the design has pulsed sources). On the right of the bar are the Measure tool, the Parts and Inspector panel toggles, and command search (Ctrl/Cmd + K), which finds commands and parts.
  • Project name: click the name to edit it. The header also provides Share, Cloud and Theme controls.

Panels and canvas

Click a part in the library to add it at the default position, or drag it onto the canvas. When a panel is collapsed, a labeled Parts or Inspector button appears in the top corner of the canvas; the same two toggles are also in the command bar and the View → Panels menu. With no selection, the inspector shows the scene overview and AI analysis; select an element to edit its properties. The ? button opens the quick guide, the small information control describes the current canvas mode, and a readout shows the pointer position on the workbench in millimetres.

Keyboard Shortcuts

Shortcuts are ignored while your cursor is inside a text field or numeric input. On Mac, use Cmd instead of Ctrl.

Delete / Backspace
Delete the current selection.
Ctrl + O
Open a design file.
Ctrl + S
Save the design to a file (writes to the linked file where the browser supports it, otherwise downloads a .json).
Ctrl + Shift + S
Save As: choose a new file name or location.
M
Turn the Measure tool on or off.
Ctrl + A
Select all elements.
Ctrl + D
Duplicate the selection (with a small offset).
Ctrl + Z
Undo the last edit.
Ctrl/Cmd + K
Search commands and parts.
Ctrl + Shift + Z / Ctrl + Y
Redo.
Ctrl + G
Group the selection.
Ctrl + Shift + G
Ungroup the selected group.
Ctrl + C
Copy the selection to the system clipboard (structured JSON; works across browser tabs).
Ctrl + X
Cut: copy to the clipboard, then remove from the scene.
Ctrl + V
Paste from the clipboard. Pasted items get new IDs and a small offset. Also accepts a plain JSON array in the saved-design format, and a URL to a .zmx lens file (e.g. a Thorlabs link), which triggers a direct ZMX import.
Arrow keys
Nudge the selection in small steps.
Shift (held while dragging)
Constrain movement to one axis.
Esc
Close open dialogs and menus; while measuring, cancel the measurement in progress or exit the tool.
Enter / Backspace / Delete / Tab
While measuring: Enter finishes a path, Backspace / Delete undo the last point while drawing (or delete the selected measurement), Tab cycles overlapping snap candidates.

Adding & Editing Parts

Adding parts

  • Click a part in the library: a new instance is placed at the default workspace position and selected.
  • Drag a part from the library onto the canvas: the preview follows the pointer and drops exactly where you release.
  • Custom meshes: the custom mirror, prism and beam-blocker entries can import your own geometry from .step, .stl, .obj or .ply files, which then behave as real optical elements in the ray trace.

Selecting

  • Click an element to select it; click empty space to deselect.
  • Shift + click: add or remove elements from the selection.
  • Shift + right-drag: box (marquee) selection of everything inside the rectangle.
  • Ctrl/Cmd + A: select all elements.
  • Click a row in the Scene Overview tree (Inspector) to select that element, useful in crowded scenes.

Moving & rotating

  • Drag a selected element to move it. With Snap on, it snaps to the grid.
  • Shift + drag: constrain movement to a single axis.
  • Drag the circular rotation ring around a selected element to rotate it; rotation snaps to the angle increment chosen in the toolbar.
  • Arrow keys: nudge the selection in small steps for precise placement.
  • For exact values, type position and rotation (pitch / yaw / roll) directly in the Inspector.
  • Focal-point marker: select a thin lens, a parabolic mirror or a spherical mirror and a ring appears on the optical axis at its focus (F, with its distance). Drag it along the axis to change the focal length; a thin lens also shows its second focal point F′ on the other side, and a spherical mirror shows its center of curvature. The marker is only a selection aid and is not saved or exported.

Visibility & labels

  • Show object in the Inspector hides the part on the canvas; it stays in the scene list so you can select it again.
  • Show label hides just the floating name. You can pin the label above, below, left or right, or drag it on the canvas to a clearer spot.

Editing properties

Every element type has its own set of Inspector controls. For example, a lens Construction is Thin (ideal focal length only), Singlet (radii, thickness, glass, and a bending slider that keeps power while changing form), Cemented doublet (two glasses, three surfaces, no air gap), or Fresnel (flat grooved profile). Spherical or cylindrical applies to all. A source exposes wavelength (with a live color preview) - enter one value, or several comma-separated wavelengths such as450, 532, 633 to launch those lines at once - plus ray count, beam width, divergence and polarization. The library's Source is one part with a Source preset in the Inspector: Collimated (flat-top), Point (diverging), Gaussian beam or Gaussian point (angular). A Point source can emit from several points along its aperture (Points, Width and Height), and a collimated source can fan every point over an angle (Divergence and Fan rays). A Gaussian preset is set by its waist w₀ and wavelength. Source pattern can switch the source to the Letter F imaging object, and Source enabled turns emission on or off. Pulsed and power controls are covered in Pulsed Sources. Changes apply instantly to the ray trace. Add a Mirror, then set Model to Flat, Spherical, Parabolic, Cylindrical / Biconic, or Retroreflector (roof or corner cube). A flat mirror can also use a retroreflective sheet. Curved mirrors can be decentered off axis, and any mirror can reflect only selected wavelengths.

Groups & locking

  • Ctrl/Cmd + G groups the selection so it moves and rotates as one unit (e.g. a multi-element objective); Ctrl/Cmd + Shift + G ungroups. Groups appear as expandable folders in the scene tree.
  • Lock prevents an element from being moved or rotated on the canvas, handy for reference elements you don't want to disturb. Lock and unlock from the context menu or Inspector.

Copy, paste & duplicate

  • Ctrl/Cmd + D: duplicate the selection in place (with a small offset).
  • Ctrl/Cmd + C / X / V: copy, cut and paste through the system clipboard. The clipboard uses structured JSON, so you can copy elements in one browser tab and paste them into a different design in another tab.
  • All of these are also available in the right-click context menu on the canvas.

Notes

Every part has a Note field at the bottom of the Inspector for part numbers, suppliers or alignment instructions. With nothing selected, the Inspector shows a note for the whole design. Notes are saved with the file and in share links but are never drawn on the canvas.

Example: a cemented doublet
Add a Lens, then in the Inspector set Construction to Thin, Singlet, Cemented doublet, or Fresnel. Switching forms keeps the same focal length. Cemented doublet swaps in two glasses (front / rear) and a shared cement radius. Spherical or cylindrical still applies. Catalog pairs such as N-BK7/N-SF2 are the safest starting point.

Views & Display Options

2D vs 3D

The 2D mode renders the scene as a flat, schematic-style drawing, ideal for classic optical-bench layouts and publication figures. The 3D mode shows the same scene with full perspective, shadows and depth, which matters for systems with out-of-plane folds or cylindrical optics. Switching modes never changes your design, only how it's drawn.

View presets

The floating strip at the top-right offers Iso, Top, Front and Side presets. The nearby zoom buttons change magnification, and the home button resets the view. In flat 2D presets, dragging on empty space pans; in 2D Iso and 3D it orbits.

Display and bench controls

The command bar provides frequent controls. Open View for display and bench settings, or Analysis for ray controls.

  • Grid, holes, and position snap: show or hide the grid and table holes independently, and choose whether dragged elements snap to the grid.
  • Rotation snap: choose the angle increment used by rotation handles. Open Snap on the command bar or View → Bench to choose an increment.
  • Rays, Polarization and Fields: show or hide traced rays, their polarization markers, or the computed field, without changing the design.
  • Live: controls continuous ray tracing while editing; it is separate from ray visibility.
  • Freeze / Resume: available for designs with pulsed sources; see Pulsed Sources.
  • Section cut: use View → Section cut to enable clipping, and View → Section plane and offset to configure it. While active, the canvas shows a Section cut ON indicator: tap or hold it for settings, or select Off to remove the cut.
  • Shadows and Labels: use View to control rendered shadows and floating element names.
  • Bench settings: choose units, optical axis height, default wavelength, position and rotation snapping, grid and table holes visibility. Open a bench control in the command bar or use View → Bench.
  • Display mode: View → Display mode, or the theme button at the top right, cycles through dark, light and paper themes. Paper uses a bright, print-friendly background; PNG, SVG and GLB exports follow the current theme.

Measuring distances and ray paths

Click Measure on the command bar (or press M, or use View → Tools → Measure) to turn the tool on. Right-click the button, or press and hold it, to choose a mode. The mode menu offers Distance, Path, Axis ruler and Ray ruler. The canvas menu (right-click or press and hold on empty canvas while measuring) adds the snapping options Objects, Ray hits and Grid, and Clear all. While Measure is on, a small bar at the top of the canvas shows the current mode and an exit button.

  • Distance: click two points. The line shows the straight-line distance, with the X and Y components and the angle in a smaller label.
  • Path: click any number of points in turn. The label shows the total length of the connected segments; select the finished path to see each segment's length. To measure along a ray, snap the points to that ray (with Ray hits on) and follow it from point to point. Press Done to finish (Enter or a double-click also works).
  • Axis ruler: pick an optical source from the bar at the top of the canvas (or click the source) to mark every surface its central optical axis meets, with the cumulative path length from the source. Click an x marker to show or hide its distance. Right-click a marker to show its angle or the Snell's-law angles (incoming and outgoing angles relative to the surface normal), set it as the zero point, set an offset, show or hide all distances, or delete the ruler. Click a distance label to type a new distance and move that element along the ray.
  • Ray ruler: the same readout for any single ray you click on the canvas, including reflected and split branches.
  • Snapping: points snap to the nearest feature under the pointer, and a tag shows what was found (Vertex, Ray hit, Center, Mid, Perp, On surface, Axis or Grid). Press Tab to cycle through overlapping candidates. Choose Free in the small toolbar that appears while drawing to place points without snapping.
  • Editing: use Undo point while drawing. Drag a point to move it. Right-click a point to delete it, insert a point on the adjacent segment, show the angle at that point, show the distance from the start of a path, or enter exact coordinates. Select a finished measurement to Copy value or Delete it. Measurements are saved with the design, so they are still there when you reopen it from a file or from the cloud; Clear all in the canvas menu removes them.

Lengths are shown in millimetres, or in inches if the Bench unit is set to inches. A measurement is a geometric length: the straight segments between the points you pick. It does not weight by refractive index, so it is not the optical path length (the sum of refractive index times geometric length along a ray). To estimate an optical path length by hand, measure each section inside a material separately and multiply it by that material's index.

Example: to find how far a ray travels from a source to a lens and on to the focus, switch to Path, snap the first point to the source, the next to the ray where it meets the lens, and the last to the focus point on the axis. The total is the geometric length of that route.

Ray colors are physical
Rays are drawn in the true color of their wavelength: a 532 nm source traces green rays, 633 nm traces red, and a white-light source through a prism fans out into a full spectrum. You can also list several discrete wavelengths in the source field (comma-separated, e.g. 450, 532, 633) to launch those lines together. Ray brightness reflects intensity, so beamsplitters, polarizers and absorbing elements visibly dim the transmitted and reflected beams.

Parts Reference

Light sources

Source
The library's main light source (a collimated beam when added). Choose a Source preset in the Inspector: Collimated (flat-top), Point (diverging), Gaussian beam or Gaussian point (angular); older designs map onto these presets automatically. Wavelength (one value, several comma-separated nm values, or white light), ray count, polarization and power are adjustable. A collimated source has a width and can fan each point over a divergence angle; a Gaussian preset uses its waist w₀ and wavelength to set the angular spread.
Point Source
Emits diverging rays over an adjustable cone angle. Models LEDs, fiber tips and point emitters. It can also emit from several points across a width and height (Points, Width, Height). Wavelength, ray count and polarization are adjustable.
Letter F (Object)
An imaging object: emission points arranged along the strokes of the letter F, each emitting its own fan of rays, so lenses and mirrors form a recognizable image you can check for inversion and magnification. Height, width and the number of stroke points are adjustable, and parts of the letter can be coloured differently.

Optics

Lens
Refractive lens with spherical, cylindrical, parabolic or aspheric surfaces (conic constant + higher-order terms). Construction: Thin, Singlet, Cemented doublet, or Fresnel (switching forms keeps focal length). Thin is an ideal lens defined only by focal length; select it to drag its focal-point marker along the axis, with the second focal point shown on the other side. A doublet is two glasses in contact (front, shared cement radius, rear) with no air gap; it can be spherical or cylindrical. Fresnel uses a thin flat grooved profile. Set focal length or radii, diameter, thickness (or two glass thicknesses), and glass from a real material catalog (including optical plastics). Cylindrical lenses focus in one axis; rotate (roll 90°) to switch the active axis. Spherical singlets have a bending slider that keeps focal length while changing shape. Catalog doublet pairs: N-BK7/N-SF2, N-SK16/F2, PMMA/PC.
Mirror
Flat, spherical, parabolic, or cylindrical / biconic reflector, round or rectangular, with optional custom mesh geometry. Curved mirrors can be decentered off axis. Any mirror can reflect only selected wavelengths. The back face can be reflective or absorbing.
Beamsplitter
Cube splitter that divides each ray into transmitted and reflected parts by an adjustable ratio.
Polarizing BS
Polarizing beamsplitter cube. Transmits p-polarization and reflects s-polarization, splitting by polarization state.
Spectral Splitter
Dichroic-style cube that routes rays by wavelength: send red one way and blue another.
Prism
Refractive prism (equilateral, right-angle and more) with real dispersion. White light fans into a spectrum.
Diffraction Grating
Splits light into diffraction orders per the grating equation; line density and orders are adjustable. In the library it appears as Grating, with Inspector types Ruled (Reflective or Transmissive), Echelle (Blazed) (Reflective), and Volume Phase Holographic (VPH) (Transmissive); older designs still open.
Diffuser
Scatters incoming rays over an adjustable spread angle. Models ground glass and engineered diffusers.
Axicon
Conical lens that turns a collimated beam into a Bessel-like focal line or ring profile.
Birefringent Crystal (Calcite)
Splits rays into ordinary and extraordinary components with different refractive indices, walk-off included.
Nonlinear Crystal (NL crystal)
Schematic crystal that can absorb, amplify (optionally saturable) or convert wavelengths, e.g. 1064 nm to 532 nm, with optional phase-matching angle and polarization rules. An approximation, not an exact nonlinear-optics model.
Waveplate
Retarder (half / quarter wave or custom) that transforms polarization, e.g. rotate linear polarization or convert it to circular.
Polarizer
Transmits only the component of light along its axis (Malus' law); intensity falls with the cosine squared of the angle.
Faraday Rotator
Rotates polarization non-reciprocally (Verdet constant), the building block of optical isolators.
Beam Blocker
Absorbs rays completely, a beam dump. Custom mesh shapes supported.
Aperture
Slab with a circular or square through-hole that clips the beam edges.

Sensors

Sensor
Captures every ray hitting its face and records position, intensity, wavelength and polarization. By default it measures both faces; turn off "Measure rays from both sides" in the Inspector to record only the front (the black back is ignored). Open the Sensors tab (or click Show in Sensors panel) for live spot diagrams, statistics, card reordering, resizable floating pins and CSV export. Hits from pulsed sources appear only while a pulse is arriving (see Pulsed Sources). With Fields on, the sensor reads total power and peak intensity from the computed field.
Spectrometer
A Sensor whose readout sums all rays hitting it by wavelength and draws the spectrum as discrete lines. Same opaque / transparent and front-only options as the Sensor. Pin it on the workspace, zoom the wavelength axis with the mouse wheel, and export CSV or PNG. You can switch any Sensor to this readout in the Inspector.
Scope
A Sensor whose readout sums all rays hitting it by arrival time since emission. A sweeping trace shows the intensity actually on the sensor, one trace per wavelength; CW light shows as a constant level. Set the time span, zoom the time axis, pin it on the workspace and export CSV or PNG.
Polarimeter
A Sensor whose readout sums the polarization of all rays hitting it, per wavelength, and shows each wavelength as a point on the Poincaré sphere. A point sits at its Stokes direction, so its distance from the centre is the degree of polarization: partially polarized light sits inside the sphere. Drag to rotate the sphere, use Reset view or double-click to reset the view, pin it on the workspace and export CSV or PNG.

Mirrors

A mirror is Flat, Spherical, Parabolic, Cylindrical / Biconic, or a Retroreflector (roof or corner cube). The retroreflector is a Model on the Mirror, with the same aperture controls as the other models. The Flat, Spherical, and Parabolic controls keep their labels and order. The groups below are added under them.

Choosing Cylindrical / Biconic starts a cylinder with power in the top view: radius Z is -100 mm, radius Y is flat, and both conic constants are 0. R > 0 is concave toward +X. R < 0 is convex.

Off-axis (decenter)

Spherical, parabolic, and biconic mirrors can shift the parent surface while the aperture stays centered. Decenter Z folds the beam in the 2D top view. Flat mirrors and retroreflectors hide this group. A retroreflector has no parent sag to shift: the faces meet at the apex. Set by off-axis angle takes an angle in degrees and a direction (+Z, -Z, +Y, -Y). For a parabola, D = 2 |f| tan(theta / 2). For a sphere, and for the biconic axis that matches the direction, D = |R| sin(theta). The helper stays off when that focal length or radius is 0. A parabola also shows parent focal length (PFL), reflected focal length (RFL), off-axis angle, and offset.

Biconic axes

Y and Z each have a profile. Flat disables the radius and reads the focal length as infinite. Spherical sets k = 0. Parabolic sets k = -1. Conic (custom k) is the only profile that shows the conic constant. Focal length reads R/2 when the axis has a radius.

Wavelength restriction

Reflect only selected wavelengths applies to every mirror, including flat. The modes are a single line (center +/- half-width), a min-max band, several bands, reflect above an edge, or reflect below an edge. Several bands keeps the list sorted, drops a range whose minimum is above its maximum, and always leaves at least one range. Invert swaps which wavelengths reflect. Rejected light can pass through or be absorbed. Use a multi-wavelength or white-light source to see the effect.

Back side

A mirror's substrate has a back face one thickness behind the reflecting surface. Back side sets what happens to rays that reach it: Reflective, the default, reflects them like the front, and Absorbing stops them. Use Absorbing when stray light should not bounce off the back of a mirror. Retroreflectors, retro surfaces and custom meshes do not show this control.

Retroreflector

Add a Mirror and set Model to Retroreflector. The kind, Roof (2D) or Corner cube (3D), sits under the aperture controls. The faces are ordinary flat mirrors, so the return comes from the bounces. The apex is the element origin and the opening faces -X. Thickness, post-reflect polarization rotation, the central hole, and the wavelength gate are the same controls the other mirror models use.

The roof uses Width (Z) and Height (Y). Square is that rectangle. Elliptical is the ellipse of those axes. Depth is read-only and equals Width (Z) / 2.

The corner cube maps the clear aperture onto three quarter-planes. Face i is the set of points s * u_j + t * u_k with s and t at least 0, where u_i are the face normals. Square uses three mutually perpendicular squares of side Width (Z), so 0 <= s,t <= Width. Height (Y) is locked to Width, because three squares need one side. Editing either control writes both. The silhouette along the axis is a hexagon, so the entrance is not a square. Elliptical keeps the part of each face inside the circle of diameter Diameter. Editing Width or Height sets Diameter to the larger of the two, the same way a spherical mirror does. Depth is read-only: the diameter times sqrt(2) / 2 for the circle, and 2 * Width / sqrt(3) for the three squares.

A central hole drops any face hit whose local Y and Z lie in the hole, so the ray passes through that opening the same way it does for a flat mirror.

Retro surface

A flat mirror can use a retroreflective sheet on both large faces. The rim stays specular. 3D returns the ray along its incoming direction. 2D keeps the Y component and negates X and Z, with grooves along Y. Ideal leaves from the hit. Periodic leaves from the point reflected through the cell center. Rays outside the acceptance angle, or outside the active part of a cell, are absorbed or reflected specularly. Ray-optics approximation: no diffraction.

Model
Flat, Spherical, Parabolic, Cylindrical / Biconic, or Retroreflector.
Retroreflector type
Roof (2D) or corner cube (3D), under the shared aperture controls. Depth is read-only.
Retro surface
Flat only. Specular, or a retro sheet with pitch, fill, efficiency, and acceptance.
Decenter Y (mm)
Parent-surface shift along Y. Hidden for Flat and for a retroreflector.
Decenter Z (mm)
Parent-surface shift along Z. Folds the beam in the 2D top view.
Set by off-axis angle
Angle in degrees and a direction. Apply writes both decenters.
PFL, RFL, angle, offset
Read-only parabola readouts. PFL is f. Offset is the decenter length.
Profile
Per axis: Flat, Spherical, Parabolic, or Conic (custom k).
Radius (mm)
Signed radius of that axis. Disabled when the profile is Flat.
Conic k
Shown only for Conic (custom k).
Focal length (R/2)
Read-only. Infinite when that axis is flat.
Reflect only selected wavelengths
Turns the wavelength gate on for any mirror type.
Rejected light
Pass through or absorb for wavelengths the gate does not reflect.
Back side
Reflective (default) or Absorbing for rays that reach the substrate back face.

Fields

Fields adds a physical-optics view of the beam on top of the traced rays. It propagates coherent Gaussian beams along the traced paths, with diffraction at apertures and blockers and interference where beams overlap. Use it to see a beam focus to its waist, or to see fringes form on a sensor in a Michelson, Mach-Zehnder, Fabry-Perot or double-slit setup.

Click Fields on the command bar, or choose Analysis → Fields. The field is computed in the background, shown in place of the traced rays, and refreshed when you change the design. Choose Analysis → Fields → Fields settings & warnings to open the Fields panel, which holds Grid N, the wavelength, Compute and Clear, and lists the cases the model does not handle for the current design. If the panel says the field is out of date, press Compute.

Michelson interferometer with Fields on and a pinned Screen sensor panel showing interference fringes
Grid N
Sampling grid of the field. Larger values show finer detail and take longer to compute.
λ (nm)
Wavelength used for the field. Leave it blank to use the source wavelength.
Compute / Clear
Run the field for the current design, or remove the result.

With Fields on, image sensors read the computed field instead of the rays. See Sensors & Readouts for the power and intensity values they report.

Start from an example
Several Gallery examples open with Fields already on: Gaussian Focus, the Michelson and Mach-Zehnder interferometers, Fabry-Perot, Young's double slit and the polarization Michelson. Open one and change a mirror tilt or a slit width to watch the fringes follow.

Fields is an approximate model for teaching and concept work, not a full wave-optics solver.

Sensors & Readouts

A Sensor records every ray that reaches its face: where it lands, how bright it is, its wavelength and its polarization. The same part can present that data in four ways, chosen with Readout in the Inspector.

Choosing a readout

Image sensor
A spot diagram of hit positions, colored by wavelength, with statistics and a hits table.Focus quality, beam size, alignment, polarization state.
Spectrometer
Total intensity per wavelength, drawn as discrete spectral lines.Filters, dichroics, gratings and wavelength conversion.
Scope
Intensity versus arrival time, one trace per wavelength, on a sweeping time axis (3 ns by default).Pulse delays, path differences and pulse trains.
Polarimeter
Polarization state per wavelength, drawn as points on the Poincaré sphere. The distance from the centre is the degree of polarization, so partially polarized light sits inside the sphere and unpolarized light sits at its centre.Polarization changes through waveplates, rotators and beamsplitters.

The Spectrometer, Scope and Polarimeter library entries are ordinary Sensors with that readout preselected, so you can switch any sensor between the four at any time without moving it.

Readings from Fields

When Fields is on, an image sensor reads the computed field instead of the rays. The Summary shows Source: Fields, Total power (W), the intensity integrated over the sensor face, and Peak intensity (W/mm2). CSV export then saves the field intensity map (local Z, local Y and intensity), and the ray hits can still be downloaded separately. When Fields is off, the sensor shows the ray totals (Total Σ S₀ and Peak S₀) as before.

Placement options

  • Opaque or transparent: an opaque sensor stops the light; a transparent one records it and lets it continue, so several sensors can sample one beam.
  • Measure rays from both sides: on by default. Turn it off to record only the front face; the black back face then ignores light.
  • Width and height set the active area. Rays outside it are not recorded.

Integration window

Image sensors, spectrometers and polarimeters have an Integration window (ns). With 0, the reading is instantaneous: pulsed light appears only while a pulse is on the sensor. With a window, the sensor collects all light that arrived during the last window of simulated time, as a real detector does during its exposure. Values are accumulated energy (intensity multiplied by nanoseconds), so a longer window gives a larger reading, and continuous light grows in proportion to the window length.

Because readings can change by orders of magnitude, the display scales itself: every 3 seconds the brightness of the spot diagram, the height of the spectrum and the wavelength range are refitted to the strongest signal seen in that interval. If a new value goes beyond the current scale, the scale grows at once, so nothing is clipped. The numbers in the summary and in exported files are never rescaled.

The Scope

The Scope draws like a sweeping oscilloscope. A cursor moves across the time window and each point is updated only as the cursor passes it, so a trace always reflects light that has actually arrived. When you change the design, the old trace remains until the new light reaches the sensor, which makes path changes easy to compare. CW light appears as a constant level.

Each wavelength gets its own trace with its own colour and a legend label in nm, so lines that look alike, such as two infrared lasers, are never added together. Turn on Total in the scope toolbar (or Total intensity in the Inspector) to sum every wavelength into one trace. The setting is saved with the design, and the CSV and PNG exports follow it.

Opening, reordering and pinning readouts

  • Every sensor in the scene has a live readout card under the Sensors tab at the top of the right panel. Select a sensor and choose Show in Sensors panel in the Inspector to jump directly to its card (on desktop and landscape phone you can also widen the right panel by dragging its left edge or double-clicking the border to reset).
  • Drag a card by its grip (or use Move up / Move down in its menu, or Alt+Up / Alt+Down on a focused card header) to change the order.
  • Pin moves a card into a floating panel over the workspace, so you can watch readings live while you edit. Drag its bottom-right corner to resize, click the expand icon to return the readout to its card, or close it to unpin. Several sensors can be pinned at once, and some examples such as Chromatic Aberration vs Achromat open with their sensor panels already pinned on desktop.
  • Each card keeps its main view (image, plot or Poincaré sphere) at a fixed size, even when no light arrives, so pulses do not make the card jump. Extra details sit in tabs below it with a fixed height; the arrow hides them.
  • The image sensor tabs are Summary (intensity-weighted statistics, degree of polarization and Stokes parameters), Hits (a per-ray table), Display (marker style, heatmap or true color) and Export.
  • The gear icon on a card or a pinned panel selects that sensor and opens its settings (readout type, size, opaque, both sides) in the Inspector tab.
  • The scope Y axis follows a rising signal at once and eases down a few seconds after the signal drops.
  • On spectrometer plots, the mouse wheel zooms and dragging pans the horizontal axis; double-click resets it. The scope uses its Span field instead.
  • The image sensor view zooms with the + and - buttons, the mouse wheel or dragging to pan. Only the data area zooms: the axes, tick labels (mm) and the scale bar stay in place and show the visible range, and PNG or JPG export includes them at the current zoom.
  • The polarimeter card shows a Poincaré sphere: one point per wavelength, sized by intensity, with the degree of polarization beside each wavelength. Drag the sphere to rotate it; Reset view (or double-click) returns it to the default orientation.
  • Every readout exports its data as CSV; plots can also be saved as PNG (and JPG on image sensors).
Example: reading a pulse delay
Send a pulsed beam through a beamsplitter so that one arm crosses a thick glass block, and put a transparent Scope on each arm. Both traces show the same pulse shape, shifted in time by the extra optical path in the glass.

Controls (Sliders)

A control is a slider bound to one parameter of one part, such as the focal length of a lens, the yaw of a mirror or the wavelength of a laser. Controls are saved with the design, so anyone who opens the file, the shared link or the embed gets the same sliders.

Adding a control

  • Select a part. In the Inspector, every parameter that can become a slider has a small slider icon next to its name. Click it to add that parameter to Controls. A filled icon means the control already exists; clicking it opens the control.
  • Or open the Controls tab and press Add control while a part is selected.

The Controls tab

Each control is a card with its slider and value. The settings button sets the label, the minimum, the maximum and the step, and lists the parts it drives. Use the arrows to reorder the cards and the select button to find the part in the scene. Dragging a slider is one step in Undo, however long the drag. The Sensors tab also shows a compact Controls strip at the top, so you can change a part while you watch a readout.

If the part is deleted, locked, or no longer has that parameter, the card shows a warning and the slider stops until you fix it or pick another part.

Floating windows

Press the pin button on a card to show that control as a floating window over the scene. Drag the title bar to move it and the edge to resize it. Windows snap to each other and form a stack that moves as one; drag a window out to pull it from the stack. Collapse a window to a small chip that still responds to the mouse wheel and the arrow keys. With two or more windows open, Tidy windows in the Controls tab puts them in one stack, away from the sensor readouts. Window positions are saved with the design.

Tip
Floating windows are available on larger screens. On a phone, use the Controls tab.

Controls in shared links and embeds

A shared design opens with its controls. An embed shows the design's controls as sliders automatically, one slider per control. In the embed generator you can hide them, or pick other sliders, which then replace them. See Embedding a Design on a Website for the URL options.

Pulsed Sources

Point Sources and Collimated Beams can emit either a continuous wave (CW) or a train of short pulses. Pulses are drawn as bright segments that travel along the traced rays, so you can see how long light takes to cross your system and when it reaches each sensor.

Turning a source into a pulsed source

  1. Select a Point Source or a Collimated Beam.
  2. In the Inspector, set Emission to Pulsed. The default is CW (continuous).
  3. Choose a Pulse shape and set the pulse width and repetition rate.

Pulse settings

Square (on / off)
The source is fully on for the pulse length and fully off for the rest of the period. The setting is called Pulse length (ns).
Gaussian (FWHM)
The intensity rises and falls smoothly, like a real laser pulse. The setting is the full width at half maximum, called Pulse FWHM (ns). A Gaussian pulse occupies about three times its FWHM, so the repetition period is never allowed to be shorter than that and pulses never overlap.
Repetition rate (MHz)
How many pulses per microsecond. The time between pulses is 1000 / rate in nanoseconds. A rate that is too high for the pulse width is limited automatically.

What you see in the viewport

  • A pulsed source no longer draws a continuous ray. Instead, pulses move along the same paths the rays take, including reflections, refractions and beam-splitter branches.
  • Pulses travel according to the optical path length, so they slow down inside glass. A pulse crossing a thick lens or a prism visibly lags behind one that stays in air.
  • Gaussian pulses fade in and out with transparency, so the brightest part of the pulse is the peak of the profile.
  • Pulses are shown in ray mode and follow the Rays visibility toggle. CW sources are not affected and keep drawing continuous rays.
  • Time runs 1e9 times slower than real time: one real second of animation equals one nanosecond of light travel. This makes nanosecond pulses easy to follow on screen.

Freezing time

When the design contains a pulsed source, a Freeze button appears next to Rays in the command bar (in the More menu on phones). It stops pulse time everywhere: pulses stay in place in the viewport and the sensors keep the reading of that instant. Press Resume to continue from the same moment. To see pulse timing as a graph, use a Scope sensor.

Sensors and pulses

  • A sensor hit from a pulsed source exists only while a pulse is actually arriving at the hit point. The sensor spot diagram, statistics and hits table update as pulses pass.
  • For Gaussian pulses the intensity of each hit follows the pulse profile, so markers fade in and out together with the pulse. Intensity values (S₀) in the table and summary change with them.
  • Hits from CW sources are always present, so a pulsed and a CW source can be compared on the same sensor.
  • The sensor window is synchronized with the viewport clock, so what you read in the sensor matches the pulse you are watching.
  • To collect light over time instead of instant by instant, set an integration window on the sensor (see Sensors & Readouts).
  • Very dense pulse trains can exceed what the viewport draws at once; the limit depends on the device. A small note then appears over the workspace. It does not change the calculation or the sensor readings.

Saving and sharing

The emission mode, pulse shape, width and repetition rate are saved with the design in local files, the cloud and share links. Designs saved before this feature existed load as CW sources, exactly as before.

Example: pulse delay through glass
Place a pulsed Collimated Beam, a thick lens and a Sensor behind it. Watch the pulse enter the glass and slow down, then open the sensor window: the hit appears later than it would for the same distance in air. Switch the pulse shape to Gaussian to see the markers fade in and out smoothly instead of switching on and off.

Nonlinear Crystal

The Nonlinear Crystal (NL crystal in the parts library) is a transparent block that can absorb, amplify or change the wavelength of the rays that cross it. It covers both frequency-conversion crystals such as KTP or BBO and active laser media such as Nd:YAG.

Important: this is a schematic approximation for drawing and explaining systems, not a nonlinear optics solver. The numbers you set are rules applied to each ray, not values computed from crystal physics.

Setting up a crystal

  1. Add an NL crystal from the library. It starts as a 10 mm KTP crystal that doubles 1064 nm to 532 nm.
  2. Set the length along X and the aperture (Y, Z). The X axis is the crystal's propagation axis.
  3. Choose the Material for refractive index and dispersion, or enter an index directly, like any glass part.
  4. Click Load typical processes to fill the list with sensible defaults for the chosen material, or build your own list with + Absorption, + Gain and + Conversion.

Processes

A crystal can hold any number of processes. They are applied in list order (use the arrows to reorder) and each one can be switched off without deleting it. Each process acts only on the wavelengths you list: a single value (1064), a comma-separated list (1064, 532) or a range (700-1000). An empty field means all wavelengths.

Absorption
Power is multiplied by exp(-α·L). With Saturable on, α drops as α / (1 + P/Psat), so strong rays are absorbed less (saturable absorber, e.g. Cr:YAG).
Gain
Power is multiplied by exp(g·L). With Saturable on, g drops as g / (1 + P/Psat), so gain flattens for strong rays.
Wavelength conversion
A fraction η = ηmax · tanh²(k·L) · (phase-matching factor) moves to the new wavelength. The rest continues at the original wavelength as its own ray, so one input ray leaves as two.
Harmonic N
Output wavelength is λ / N (N = 2 for second harmonic, 3 for third, and so on).
Fixed wavelength
Any input in the list is mapped to one output wavelength you choose, for example 1064 nm to 423 nm.
Phase matching
Efficiency follows a sinc² curve of the internal angle between the ray and the crystal X axis. The acceptance FWHM is the full angle at which efficiency falls to half. Rotate the crystal to tune it.
Only one linear polarization
The process acts only on the linear polarization component along the chosen axis (measured like a polarizer angle). The orthogonal component passes unchanged.
Output polarization
Same as input keeps the polarization of the original ray. Linear, set angle forces a linear polarization on the converted light.

Saturation levels are relative to the launch power of a single ray (1 = the ray's launch power). Anything not set explicitly is inherited from the input ray: direction, polarization, the source it came from and its pulse timing. A pulse that enters at 1064 nm therefore leaves as two pulses, one at 1064 nm and one at 532 nm.

Ready-made materials

KTP, BBO, LBO, KDP, BiBO
Second harmonic of 1064 nm with different efficiency and acceptance angle.
LiNbO₃ / PPLN
Second harmonic of 1550 nm with a wide acceptance (quasi phase matched).
Nd:YAG
Absorption at 808 nm (pump) and saturable gain at 1064 nm. This is a laser medium, not a nonlinear crystal.
Nd:YVO₄
Polarized absorption at 808 nm and polarized saturable gain at 1064 nm.
Ti:Sapphire
Absorption at 488-532 nm and gain over 700-1000 nm.
Cr:YAG
Saturable absorption at 1064 nm (passive Q-switch).

What it does not model

  • No real phase matching physics. Real efficiency depends on crystal cut, birefringence, temperature and wavelength through Δk. Here it is only an angle rule around the X axis.
  • No intensity dependence for conversion. Real harmonic generation grows with peak intensity (beam focus, pulse peak power). Here efficiency depends only on length and angle, so focusing the beam does not increase it.
  • No mixing of two beams. Sum and difference frequency generation, parametric amplification and OPOs need two inputs meeting in the crystal. Each ray is converted on its own here. Mappings like 1064 nm to 423 nm are allowed as a drawing shortcut even though in reality they need a mixing process.
  • Power, not photons. Conversion moves power between wavelengths. Real conversion conserves photon energy and momentum, and gain media need population inversion and a pump; none of that is computed.
  • Single refractive index. The crystal uses one index per wavelength. Birefringence and walk-off are not included (use the Birefringent Crystal for that).
  • Applied at the exit. Effects use the straight entry-to-exit length and are applied once when the ray leaves, so the ray inside the crystal is still drawn at its input wavelength.
Example: green laser pointer
Place a Collimated Beam at 1064 nm, then an NL crystal (KTP) and a Sensor. Two rays leave the crystal: the green 532 nm light and the leftover 1064 nm. Add a Spectral Splitter or a filter behind the crystal to separate them, and tilt the crystal to watch the green output drop as you leave the acceptance angle.

AI Tools

AI Scene Assistant

The button at the top of the Parts Library opens the AI scene assistant. Describe what you want in plain language - for example "a Keplerian telescope with 200 mm and 50 mm lenses", "a 4f relay with spatial filter", "an optical isolator with Faraday rotator", "a Michelson interferometer", "an axicon Bessel beam generator", "set the lens focal length to 150 mm", or "align sensor to focal plane". The assistant recognizes all parts library objects (lenses, mirrors, prisms, gratings, beamsplitters, polarizers, waveplates, Faraday rotators, birefringent and nonlinear crystals, axicons, and sensors), understands their orientations and physical properties, and places them with verified optical spacing.

Live Canvas Preview & Multi-Turn Iterations: When the assistant proposes changes, it previews them directly on the workbench canvas with traced rays before committing. You can review the preview, zoom/pan, and conversationally refine the proposal across multiple iterations (e.g. "nudge lens 2 forward 20 mm","optimize the focal distance") until satisfied, then click Apply changes to commit as a single undoable step.

Optical Optimizations: The assistant can perform fast analytical optimizations directly in the browser: collimation positioning ($s = f$), sensor best focus alignment, afocal telescope separation ($f_1 + f_2$), and Coddington lens bending for minimum spherical aberration. Heavy multi-variable global optimization (such as multi-surface damped least squares / DLS across 20+ freeform surfaces) or Monte Carlo tolerancing requires desktop suites like CODE V; the assistant will clearly advise you whenever an optimization can be solved analytically in OpticSketcher or requires an external suite.

After a generation, you can also ask for a revision of the last AI-added batch ("Request a fix"), or remove elements that session added. Always verify positions, orientations, and the traced rays.

Named classic designs (Cooke, Tessar, Planar, Distagon, Plössl, Cassegrain, and many Handbook-style aliases) are recognized by name, type, description and parameters. The assistant maps them onto a curated scalable form; it does not load commercial prescription files. If EFL, F/# or object distance is missing or several names match, it asks a short clarifying question first. To place an exact lens prescription you already own, use File → Import (ZMX .zmx / .zar, or CODE V / OpTaliX .seq / .otx).

Advanced System Analysis (AI & Optics)

In the Inspector (with nothing selected), Optical Analysis (AI) performs deep analytical and AI-powered inspection of your active setup. It automatically recognizes known optical architectures (Keplerian and Galilean beam expanders, 4F Fourier relays, spatial filters, collimators, Michelson and Mach-Zehnder interferometers, optical isolators, polarimeters, spectrometers, axicon Bessel generators, and nonlinear frequency converters).

Optical Functionality & Beam Journey: The analyzer decomposes the light propagation into sequential functional stages (Injection → Modulation/Conditioning → Detection) and calculates fundamental system metrics, including total optical track length, surface count, directional folds, and conjugate configuration.

Actionable Recommendations & 1-Click Fixes: The analyzer detects geometric defocus, collimation spacing errors ($s \neq f$), afocal spacing deviations ($d \neq f_1 + f_2$), chromatic dispersion risks in broadband singlets, and spherical aberration in fast lenses ($F/\# < 3$). Where applicable, an interactive Apply Fix button allows you to immediately correct the spacing or perform Coddington lens bending on the canvas as a single undoable step.

Interactive Q&A & Suggested Questions: The panel offers smart, context-aware question chips tailored to your exact layout (e.g. "What is the system magnification?", "Where is the focal plane?","How to reduce spherical aberration?"). You can also type any free-form optical engineering question, receiving rigorous explanations grounded in your setup's real parameters and formulas.

Example: measuring focus quality
Ask the assistant for a lens and a sensor at its focal plane, then open the sensor data. Move the lens slightly: the spot grows as you defocus. Replace the lens with an aspheric one and compare the spot sizes to see spherical aberration disappear. Sensor readouts are described in Sensors & Readouts.

Files, Cloud & Sharing

Local files

The File menu saves your design as a local .json file and loads it back later: a fully self-contained snapshot you can keep, version or email, including your notes and measurements. Guests (without an account) can work entirely with local files; the current sketch is also kept in the browser between visits.

  • Open (Ctrl/Cmd + O), Save (Ctrl/Cmd + S) and Save As (Ctrl/Cmd + Shift + S).
  • In browsers that support direct file access (such as Chrome and Edge on a computer), Open and Save As remember the file, so Save writes straight back to it. In other browsers, Save downloads a new .json file and Open asks you to choose one.
  • Auto-save to file (File menu; available once a file is linked in a supporting browser) saves changes to that file a few seconds after you stop editing. If it cannot write, you are asked to use Save As.
  • New design and Clear all ask for confirmation when you have unsaved changes.

Examples

File → Examples lists classic forms and tutorials from the same library as the public Gallery. Choosing one replaces the current sketch (you will be asked to confirm if you have unsaved work) so you can explore a working system immediately.

Cloud designs

  • Sign in and use the cloud button in the toolbar to save designs to your account and open them from any device.
  • Each design keeps a revision counter: if the same design was changed on another device, you'll get a conflict prompt instead of silently overwriting your work.
  • The cloud picker shows a thumbnail preview of every saved design.

Sharing

  • Temporary link: a self-contained snapshot of the current design; anyone with the link can open it for 14 days. Guests can create temporary links without signing in, and recipients never need an account to open one.
  • Permanent link: linked to a cloud design; it always opens the latest saved version and never expires. Requires the design to be saved to the cloud.

Import & export formats

.json
Save / LoadNative design file: full scene, lossless.
.zmx / .zar
Import / ExportSequential lens prescriptions. Import ZMX files, or archives (ZAR) that contain them, from File → Import → ZMX files; or paste a public ZMX URL (e.g. a Thorlabs product link) onto the canvas with Ctrl+V or the right-click menu. Export converts lens stacks on a straight axis (thick spherical or aspheric lenses and thin lenses) back to ZMX, for the whole scene or the selection; other parts are skipped with an explanation.
.seq / .otx
ImportCODE V and OpTaliX sequential lens files (File → Import → CODE V / OpTaliX): native OpTaliX lens files, rdy / thi / gla commands, CODE V "S" lines, and ZMX text. Lenses, cemented doublets, mirrors and thin lenses are created; tilts and decenters are stored but not applied. An import report lists anything that was approximated or dropped.
.step / .stp / .obj / .stl / .ply
ImportFile → Import → 3D CAD brings in custom meshes as mirrors, prisms or blockers. STEP import supports faceted (polyhedral) solids; curved CAD surfaces are not converted, so export those as STL or OBJ first.
.obj / .stl / .ply
ExportExport the whole scene or only the selection as solid geometry for CAD (File → Export).
.glb
Export3D scene export for viewers and rendering tools.
.png / .svg
ExportPublication-ready images of the current view in the current theme (dark, light or paper); SVG stays crisp at any scale. PNG, SVG, GLB and mesh exports need an active WebGL viewport.
.csv
ExportSensor data: ray hits (position, intensity, wavelength, polarization), spectra and scope traces.
Example: importing a real catalog lens
On a computer, copy the link to a public ZMX file, click the canvas and press Ctrl + V to import it. On a phone, open Menu (☰) → File → Import → ZMX files (.zmx, .zar) to import a file. The prescription is converted into a lens or lens group in your scene.

Embedding a Design on a Website

Any design can be published as a live, ray-traced viewport inside another page - a lecture site, a lab wiki, a product page or a blog post. Visitors see the real simulation, not a screenshot: the same engine, the same optics and the same rays as in the editor, with only the interaction limited to what you allow.

Creating the embed code

1
Share the design
Sign in, press the share button in the toolbar and create a link. A temporary link carries a snapshot of the design and expires after 14 days; a permanent link stays in sync with the cloud copy, so every edit you save is reflected in the embed automatically.
2
Open the embed generator
In the share panel, choose "Get embed code for a website".
3
Choose how visitors may interact
Pick the interaction mode, the 2D or 3D view, a dark or light theme, and any parametric sliders you want to expose, then use "Display options" to hide part labels, shadows, the editor button, the "Powered by" badge or the Reset button, and to forbid zoom or pan. Choose a fixed height or a proportional frame (16:9, 4:3, square) that scales with the page, and press "Show live preview" to see the result before copying. The code updates as you change the options.
4
Paste the snippet into your page
Copy the generated iframe tag and paste it into your HTML, or into any content editor that accepts embed code. The height in the snippet can be edited freely.

Interaction modes

Static view
Nothing - a live-rendered but fixed diagram. Best for figures inside text.
Camera only
Rotate, pan and zoom the scene. The optics themselves cannot be moved.
Draggable parts
Move the parts you name, optionally locked to a single axis. Everything else stays fixed.

In "Draggable parts" mode the generator lists every part in your design. Tick the ones a visitor may move, and choose Free, X only or Z only for each - an axis lock keeps a lens on the optical axis while still letting the visitor explore focus.

Parametric sliders

Sliders turn an embed into a teaching demo, and each slider is bound to one parameter of one specific part. The generator lists the parts in your design and, under each, exactly the parameters that part can expose: focal length or the two curvature radii of a lens, the radius of a spherical mirror, the yaw, pitch and roll of a prism or mirror, refractive index, wavelength, divergence, beamsplitter reflectance, polarizer or waveplate axis, Faraday rotation, grating density and more.

The rays retrace live as the visitor moves a slider, so a single embed can show how the image distance follows the focal length, how dispersion through a rotating prism changes with wavelength, or how a curvature change turns a collimated beam into a focus.

If the design already has Controls (the sliders in the editor's Controls tab), the embed shows them automatically and the generator lists them as included. Tick "Hide this design's controls in the embed" to leave them out, or pick sliders in the generator to use those instead.

Editing the URL by hand

Everything the generator does is stored in the iframe address, so you can also edit it directly. Every switch below is optional and defaults to the value shown.

mode=static | camera | drag
How visitors may interact. Without it the embed is static.
view=2d | 3d, theme=dark | light
Starting view and colour theme.
labels, shadows, cta, badge, hint, reset (true | false)
Show or hide part labels (true), floor shadows (true), the editor button (true), the Powered-by badge (true), the interaction hint (true) and the Reset button (true).
zoom, pan (true | false)
Allow zoom or pan when the camera is live (both true).
allowDrag=L1,M2:x,L3::50
Parts that may be moved, with an optional axis lock (x or z) and a travel limit in mm.
controls=Main Lens:focal@80
Sliders as part:parameter. The optional @value sets the starting value, so the first frame already shows it. A list here replaces the design's own controls. Without it, the embed shows the controls saved with the design.
controls=none
Hide the design's own controls.
Embeds are read-only by design
No embed can add, delete, rotate or rename anything, and nothing a visitor does is written back to your design. An "Open in the editor" link can be shown so interested readers can continue from your setup in their own session.

Citing OpticSketcher

If you use OpticSketcher in published work, open Help → Cite OpticSketcher in the editor to copy the text citation or the BibTeX entry; the archived record is at https://doi.org/10.5281/zenodo.24081874.