JEKray
An optical bench simulator and lens-design workspace that shows the waves as well as the rays.
Lay out sources, lenses, mirrors, fibre and detectors on a virtual breadboard and see the light traced as you move them: exact rays through real glass, diffracted Gaussian beams with interference and polarisation, in 2D and 3D. Then design the lenses themselves: optimise them, analyse them, tolerance them, draw them for the workshop and send them to CAD.
Makers’ lens filesThorlabs and Edmund .zmx and .zar files import and focus to the makers’ stated focal lengths and back focal lengths.
Published resultsFox and Li’s resonator losses, Safronova’s atomic polarisabilities, measured rubidium absorption and a levitated nanosphere’s damping, reproduced from the papers.
Lens designReal rays, Seidel aberrations and Strehl ratios of a singlet and a Cooke triplet against an independent ray tracer; every analysis against closed-form results; CAD exports checked in an independent CAD kernel. Some 870 automated checks in all. The validation page.
Who it is for
Research groups
Plan a bench before cutting metal: mode-match a laser to a cavity, lay out an interferometer, check a lock error signal. Keep the group’s benches in one team workspace with their history.
A cavity finding its modeTeaching
Forty-eight examples students can open and break: a Michelson, a Fabry–Pérot, a grating spectrometer, optical tweezers. One licence covers a whole university, with no seats to manage.
For universitiesLens design in industry
Take a lens from first idea to the workshop: optimise it, tolerance it for yield, match it to stock lenses, then hand over ISO 10110 drawings, a .zmx file and STEP solids for the mechanical design.
Lens designSimulate the whole bench
Free-space optics, fibre and the electronics after the detector, with photonic chips too, solved together on one bench across as many tabs as you like. Light leaves a fibre and enters free space, lands on a photodiode and carries on as a signal through amplifiers, mixers and lock-ins to an oscilloscope.

Rays, Gaussian beams and the full diffracted field
Exact rays through real glass, each carrying its polarisation and optical path. Gaussian beams followed through every branch, so interferometers show fringes and cavities resonate. And the diffracted field where rays cannot tell the story: slits, masks, a tight focus, a vortex beam. Raise, tip and roll any part and the light follows in 3D, the field glowing along each beam in calibrated W/cm².

Design lenses from scratch
From a singlet to a multi-element assembly: build the prescription with solves and pickups, aspheres, freeforms, diffractive surfaces and graded glass, and zooms as configurations. Optimise for a merit function you build, search for new starting points, and choose from some 1,200 glasses in the makers’ catalogues. Then look at it from every side: spots, fans, wavefront, PSF and MTF, relative illumination, ghosts, polarisation, temperature, and a picture as the lens would form it.

From design to drawing to CAD
Tolerance it with sensitivity, Monte Carlo and inverse sensitivity, with compensators and a yield against your specification. Draw each lens in the manner of ISO 10110 and the whole design as a report. Export a .zmx file, or STEP solids and an STL mesh for the mechanical design. And bring your own stock lens files to find which could stand in for each lens, and how well.

Quasi-optics from 1 GHz to 3 THz
Feed horns, RF lenses, mirrors, wire grids and mesh filters, with the beam’s diffraction worked out properly at these wavelengths. Plastic lenses made to order, solid or graded in density, show their loss, how well the beam fits them, and whether they are manufacturable. Sweep a link across frequency for its S21 and link budget, steer the beam off axis, and take the signal on to a mixer and a spectrum analyser.
The RF designer designs a whole system, from a feed horn’s beam through its lenses to a collimated beam, a waist or a receiving horn: lenses made to suit the beam (hyperbolic, graded-index or cut in zones), every loss over the band, optimised and toleranced, then a drawing and a quote for each lens.

Your benches online, alone or as a team
Sign in with Google or Microsoft and benches save as you work, with their whole history. Fork one to try an idea and merge it back. Keep your own parts in My parts. A team shares one workspace with roles, invitations by email, one editor at a time and an activity record. Export everything at any time, and delete your account whenever you like.

Everything else it models
Beyond the rays and the field, each part carries the physics that makes it work, so a bench behaves as it would in the lab.
Lasers and cavities
- Gain media, laser threshold and the best output coupler
- Cavity modes, finesse and linewidth, misaligned cavities included
- A cavity finding its own mode, as Fox and Li found it
- Line widths and coherence length: fringes that fade as they should
Pulses
- Ultrafast pulses through glass, gratings and compressors
- Dispersion and chirp, pulse by pulse
- Self-phase modulation and solitons in fibre
Nonlinear and active optics
- Frequency doubling in PPLN and PPKTP, by Boyd and Kleinman’s theory
- EOMs and AOMs with their sidebands and frequency shifts
- Fibre amplifiers and semiconductor optical amplifiers
Atoms and traps
- Rubidium, caesium and potassium vapour cells: hyperfine lines, Doppler broadening, saturated absorption and the Zeeman effect
- Optical forces on atoms and particles: tweezers, dipole traps and lattices
- Levitated nanoparticles, with their trap frequencies and damping
Polarisation and shaping
- Waveplates, polarisers, Wollaston prisms and birefringent crystals
- Faraday rotators and isolators
- Masks, spatial light modulators and vortex beams
- Vector fields at a tight focus
Signals and workflow
- Photodiodes, transimpedance amplifiers, mixers, lock-ins, oscilloscopes and spectrum analysers, with their noise
- Pound–Drever–Hall and other lock error signals
- Sweep any setting and watch the bench change
- Mounts from CAD as STL, part packs and your own models as mods
See it work
Open an example from the gallery and drag a lens: the light is traced again as you move. Read the spectrum on the detector, turn the bench in 3D, find any part in the picker, and save the bench to the cloud with JEKrayPro, beside your team’s.
Pricing
The simulator is free, with or without an account, under the JEKray Licence. JEKrayPro adds the cloud. Prices include VAT where it applies; payment is taken by Stripe and you can cancel any time. If a subscription ends, every bench can still be opened and exported.
- The whole simulator
- 48 examples and a guided tour
- Lens design, tolerancing and drawings
- Save .jekray files and share links
- Import .zmx and .zar lens files
- Benches saved as you work
- Version history, forks and merges
- My parts on any bench
- Any computer, any browser
- Everything in Pro
- For students and university staff
- Confirmed by a university address
- One shared workspace
- Owner, admins and editors; viewers free
- Invitations by email
- One editor at a time, activity record
- Pro on each member’s own benches
- Everyone at the university
- No seats to manage
- Signs in with the university account
- Data protection agreement
Examples
Each example opens in the editor, ready to explore. Click any part to see its settings and results. Here they are by topic, or browse them all in the editor’s gallery.
Interference and cavities6 examples
Michelson interferometer
A 50/50 cube with one fixed and one moving mirror. Sweep the moving mirror to see the output port go light and dark.
Open in JEKray →
Mach–Zehnder interferometer
Two arms recombined at a second cube, sharing the power between two outputs.
Open in JEKray →
Fabry–Perot cavity
Two mirrors with screens on the reflected and transmitted light. Shows finesse, linewidth and the resonance scan.
Open in JEKray →
Fox–Li resonator
Two flat mirrors whose edges shape the modes. The classic Fox and Li calculation, done by the solver.
Open in JEKray →
Pound–Drever–Hall lock
A 20 MHz EOM, a pick-off and a Fabry–Perot cavity. The photodiode’s mixer gives the PDH error signal: zero when locked, changing sign either side of resonance.
Open in JEKray →
Laser cavity with gain
A Nd:YAG gain sheet in a two-mirror cavity. Above threshold the gain saturates: the card gives circulating and output power and the best output coupler, and the output leaves as a beam.
Open in JEKray →Diffraction and imaging11 examples
Young’s double slit
A laser through a double slit onto a screen 1 m away. The fringes come from the diffracted field.
Open in JEKray →
Poisson’s spot
A bright spot at the centre of a round beam block’s shadow.
Open in JEKray →
Plano-convex: which way round?
The same lens facing each way. Compare the spherical aberration at the two foci.
Open in JEKray →
Aberrations of a singlet across the field
A lens behind an aperture stop, swept to ±5°: spot diagrams, Seidel and Zernike terms, field curvature and barrel distortion.
Open in JEKray →
Tight focus, vector
A perfect lens with a 3 mm focal length. At this numerical aperture the focal field is computed as a vector.
Open in JEKray →
Maltese cross
A steeply focusing lens between crossed polarisers. Fresnel coefficients leave a four-leaf pattern.
Open in JEKray →
Off-axis parabola
A 90° off-axis paraboloid focuses a collimated beam to a point with no aberration. Set the conic to 0 to see a sphere’s.
Open in JEKray →
Axicon: a Bessel beam
A 1° axicon turns a Gaussian beam into a line focus, a Bessel beam that keeps its narrow core for over 100 mm before opening into a ring.
Open in JEKray →
Vortex beams: mode converter and SLM
A Laguerre–Gauss vortex through a cylindrical-lens mode converter comes out as a Hermite–Gauss mode turned 45°. A fork hologram on an SLM focuses to a dark-centred ring.
Open in JEKray →
Optical differentiator
A 4f system with a ramp in its Fourier plane: what comes out is the derivative of the light that went in.
Open in JEKray →
Optical integrator
The same 4f system with a 1/x mask in its Fourier plane integrates the light instead.
Open in JEKray →Polarisation and spectra5 examples
Wollaston polarimeter
A half-wave plate and a calcite Wollaston prism split the light onto two photodiodes. Play the waveplate sweep to move power between them.
Open in JEKray →
Optical isolator
A retro-reflected beam, a pick-off and a Faraday isolator. Drag the isolator out and watch the back-reflection come back 40 dB stronger.
Open in JEKray →
Grating spectrometer
Mercury lines through a 600 l/mm grating and a 100 mm lens. Each colour lands at its own place; the yellow doublet, 2.1 nm apart, lands 0.1 mm apart.
Open in JEKray →
Dispersing prism
White light through an N-SF11 prism at minimum deviation, near Brewster’s angle. Turn it to find the minimum, or change the glass.
Open in JEKray →
Dichroic combiner, two tables
A 532 nm and a 1064 nm laser combined on a dichroic, carried to a second tab by link planes, and focused by one lens.
Open in JEKray →Fibre4 examples
Fibre heterodyne
A fibre Mach–Zehnder with an 80 MHz AOM in one arm. The photodiode shows the beat note in its RF spectrum and on its oscilloscope.
Open in JEKray →
Two launches from one laser
One fibre laser split by a coupler into two collimated launches that meet on a cube. Change the fibre lengths or the coherence length and watch the fringe contrast.
Open in JEKray →
Fibre Michelson, Faraday mirrors
A circulator, a coupler and two Faraday mirrors. Turn the polarisation controller: the fringes keep full contrast.
Open in JEKray →
Fibre amplifier and its noise
A weak signal through 20 km of fibre and an erbium amplifier. Its spontaneous emission reaches both photodiodes; a narrow filter takes out most of it.
Open in JEKray →Atoms and traps8 examples
Saturated absorption, rubidium
A weak probe and a strong pump through a rubidium cell: the Doppler-broadened D2 line, with sub-Doppler Lamb dips and crossovers where pump and probe meet the same atoms.
Open in JEKray →
Polarisation spectroscopyBeta
A circularly polarised pump makes the cell birefringent for the probe at the sub-Doppler lines: a balanced pair of diodes reads a dispersive lock signal with no Doppler background.
Open in JEKray →
DAVLL laser lock
A magnetic field splits the rubidium lines for the two hands of circular light; a quarter-wave plate, a polarising cube and two diodes turn that into an error signal across the whole line.
Open in JEKray →
Faraday filter
A hot rubidium cell in a field between crossed polarisers: Faraday rotation passes light only within a few GHz of the lines.
Open in JEKray →
Optical dipole trap, rubidium
2 W at 1064 nm focused to 34 µm: the screen’s Trap tab gives a 150 µK trap for ⁸⁷Rb, its trap frequencies and the photon scattering rate, from the diffracted field.
Open in JEKray →
Two-dimensional optical latticeBeta
Four beams from one laser, crossed at a point: a checkerboard of traps for rubidium, each site 0.3 mK deep with 160 kHz trap frequencies.
Open in JEKray →
Optical tweezers in water
A water-immersion objective, NA 1.2, holding a 120 nm polystyrene bead: stiffer across the polarisation than along it, and overdamped by the water.
Open in JEKray →
Levitated nanoparticle in airBeta
A 150 nm silica sphere in an NA 0.8 tweezer at 5 mbar: trap frequencies near 180 kHz and the quality factor the gas leaves each motion.
Open in JEKray →Pulses2 examples
Grating pulse compressor
A chirped 100 fs pulse through a Treacy grating pair. The Pulse tab shows it compressed from 460 fs back to 102 fs.
Open in JEKray →
Self-phase modulation and a soliton
One fibre laser, two spools: a soliton that arrives as short as it left, and a pulse whose spectrum self-phase modulation broadens while normal dispersion stretches it.
Open in JEKray →Nonlinear optics2 examples
Frequency doubling
Two lasers doubled in periodically poled crystals: 1560 → 780 nm in PPLN and 1064 → 532 nm in PPKTP, with efficiency, phase matching and temperature tuning.
Open in JEKray →
Self-phase modulation and a soliton
One fibre laser, two spools: a soliton that arrives as short as it left, and a pulse whose spectrum self-phase modulation broadens while normal dispersion stretches it.
Open in JEKray →Electronics1 example
RF and millimetre waves9 examples
PLA lens, 10 GHz
A horn’s beam collimated by a PLA lens: its loss, its edge taper, and whether it is manufacturable.
Open in JEKray →
Graded-index lens, 24 GHz
A flat disc whose density falls from its centre to its edge focuses a horn’s beam.
Open in JEKray →
ABS lens, 24 GHz radar
A radar horn behind an ABS lens: the band where plastic RF lenses of this size work best.
Open in JEKray →
Lens antenna, 24 GHz
A worked example of the RF designer: a PLA lens designed for its horn, its gain over the band, its tolerances and its quote.
Open in JEKray →
Gaussian beam telescope, 150 GHz
A worked example of the RF designer: two hyperbolic lenses image a feed horn onto a receiver.
Open in JEKray →
Millimetre-wave link, 150 GHz
Two feed horns and two HDPE lenses: the power a horn takes in, in dBm.
Open in JEKray →
Mesh filter, swept
A band-pass mesh in a Gaussian beam telescope: the receiver’s S21 against frequency, and its link budget.
Open in JEKray →
Wire-grid diplexer, 150 GHz
A wire grid at 45° reflects the field along its wires and passes the other.
Open in JEKray →
Heterodyne link, 150 GHz
A 1 GHz tone up on a 150 GHz carrier, across two lenses and down through a mixer to a spectrum analyser.
Open in JEKray →Photonic circuits1 example
Resources
An AI assistant (ChatGPT, Claude, Gemini, Copilot and others) can write JEKray projects for you. Give it the guide below, which teaches it the file format, the conventions and the checks to make, then ask for a .jekray file.
Download the JEKray guide for AI assistants (.md)Some things to ask for:
- “Design a Michelson interferometer at 1064 nm with 100 mm arms and a photodiode on the output. Give me a .jekray file.”
- “Rebuild the optical setup in figure 1 of the attached paper as a .jekray file. Put your assumptions in the notes.”
- “Add a mode-matching lens pair so this laser matches the cavity in the file I attached.”
Paste the answer into JEKray with Open ▾ → Pasted text (or Ctrl+V on the bench). If anything could not be used as written, the tool lists it: copy that report back to the assistant and it can fix the file. Check what it built against your source before relying on it.
Signing in is optional: the simulator works the same without an account, and keeps your work in your browser. With JEKrayPro, benches are stored by JEK Systems on Cloudflare, with their history; card payments are handled by Stripe, and we never see card numbers.
JEKrayPro Terms Privacy Policy Security overview Accessibility statement JEKrayPro for universitiesJEKray works in the plane of the bench. It has no skew rays, no out-of-plane tilts and no anamorphic systems, and it does not model scatter, thermal effects or coating dispersion. Power figures ignore absorption unless you set it on a material.
The documentation sets out each model, its equations and its limits, element by element.
The validation page runs JEKray against published results and independent codes, live in your browser. For anything that gets built, funded or published, check the numbers in an established optical design package first.