Launching March 6th — macOS · Windows · Linux

Professional optical design,
at a price you can afford.

You shouldn't need to pay thousands of dollars and contact for quotes to design an optical system. Trefoila gives you GPU-accelerated ray tracing, MTF, wavefront analysis, optimization, and tolerance analysis for just $49/month. Buy it online, and download instantly.

Instant download No quotes, no sales calls Cancel anytime
Trefoila full workflow — 2D layout, lens data editor, and MTF analysis simultaneously
GPU-Accelerated via JAX
Python-Native API
macOS · Windows · Linux
Instant Download
No Quotes · No Sales Calls
Trefoila full workflow — glass catalog picker, 2D layout, and MTF analysis
Core Workflow

The spreadsheet you already know — but smarter.

Enter and edit your lens prescription in a familiar row-and-column format. Define surface type, radius, thickness, glass, and semi-diameter. See your 2D layout update live alongside the table as you type.

  • Spherical, conic, aspheric, Zernike freeform, and 8 surface types
  • Full Schott, Ohara, Hoya, CDGM glass catalog — 1,000+ materials
  • Live paraxial update: EFL, BFL, f/#, NA, cardinal points
  • Surface solves: marginal ray height, chief ray height, quick focus
2D lens layout view 1
2D lens layout view 3
System Visualization

See your design, not just the numbers.

Instant 2D cross-section layout with multi-field ray bundles rendered in real time. Every parameter change redraws in milliseconds. Choose which field angles and wavelengths to display.

  • Multi-field, multi-wavelength ray fan overlay
  • Vignetting visualization — see exactly which rays are clipped
  • Aperture stop and pupil location markers
  • 3D interactive view for complex geometries
  • Export as SVG or PNG for reports and publications
MTF analysis showing polychromatic MTF curves for multiple field angles
MTF analysis second view
Performance Analysis

MTF, computed the way you need it.

Modulation Transfer Function is the industry-standard measure of lens resolution. Compute polychromatic MTF for any number of field angles, tangential and sagittal, against the diffraction limit — in seconds.

  • FFT wave-optics MTF — the most accurate method
  • Multi-field, multi-wavelength in a single computation
  • Polychromatic weighted PSF summation
  • Through-focus MTF to find the best image plane
  • Export data as CSV for post-processing
Spot diagram grid showing ray scatter for multiple wavelengths and field positions with RMS radius labels
Wavefront OPD analysis showing Zernike decomposition
Image Quality

Spot diagrams, wavefront, and Zernike decomposition.

A complete picture of image quality in one place. Spot diagrams show where rays land at the image plane per wavelength and field angle. Wavefront analysis reveals the phase error that limits diffraction performance.

  • Full spot grid: any field × wavelength combination
  • Per-wavelength coloring — F, d, C lines at a glance
  • RMS radius, geometric radius, and Airy disk overlay
  • Wavefront OPD fan plots (tangential and sagittal)
  • Zernike fitting — 11 Noll-ordered terms, Strehl ratio
Optimization panel showing variables, operands, and Differential Evolution optimizer running with progress bar
Optimization Engine

Autodiff optimization. Nothing else comes close.

Trefoila uses JAX automatic differentiation through the complete ray trace — computing exact analytic gradients instead of slow finite differences. This capability doesn't exist in any commercial tool.

  • Damped Least Squares (Levenberg-Marquardt) — industry standard
  • Differential Evolution for robust global search
  • JAX autodiff gradients — exact, not approximated
  • Composable merit function with weighted operands
  • Edge thickness, center thickness, and clearance constraints
Analysis Suite

Every metric. One tool.

From first-order paraxial properties to wave-optics PSF — the analytical toolkit professional optical designers actually use, all built in.

PSF

Wave-optics Point Spread Function via FFT of the pupil with OPD phase. Strehl ratio computed directly from PSF peak intensity.

Ray Fan Diagrams

Tangential and sagittal ray fans for any field point. Chromatic fans overlay all wavelengths to show longitudinal and lateral color simultaneously.

Paraxial Analysis

EFL, BFL, f/#, NA, entrance and exit pupil locations, cardinal points, magnification — computed from paraxial ray trace.

Seidel Aberrations

All five primary Seidel coefficients — spherical, coma, astigmatism, field curvature, distortion — with surface-by-surface breakdown.

Wavefront / OPD

OPD fan plots with Zernike decomposition (11 Noll terms), piston and tilt removal, and RMS wavefront error in waves.

Tolerance Analysis

Monte Carlo over 5 tolerance types: radius, thickness, tilt, decenter, and index. Sensitivity ranking and inverse sensitivity allocation included.

How We Compare

Everything the incumbents have.
At a fraction of the price.

Trefoila doesn't cut corners — it cuts the bloat. The features professional optical designers actually use, delivered instantly, with no enterprise procurement process.

Feature Trefoila Enterprise Software
Price $49/month Contact sales for quote
Instant download
Python API / scripting Native (proprietary macro)
GPU acceleration JAX
Autodiff optimization Unique
Ray tracing engine
MTF analysis
Wavefront / OPD
Tolerance analysis
Optimization engine
macOS support
Linux support
No enterprise procurement

* Enterprise software typically requires a quote process. Trefoila pricing is transparent — buy online instantly.

Simple Pricing

One plan. Everything included.

No tiers, no feature walls, no annual lock-in. Everything Trefoila offers, for one transparent monthly price.

Trefoila
$49
per month · cancel any time
  • Full ray tracing engine (8 surface types)
  • Complete glass catalog (1,500+ materials)
  • MTF, PSF, spot diagrams, wavefront, OPD
  • Seidel aberrations, ray fans, paraxial
  • Damped Least Squares & global optimization
  • Monte Carlo tolerance analysis
  • Sensitivity + inverse sensitivity + budget
  • Python API — full scripting access
  • GPU acceleration via JAX (optional)
  • macOS, Windows, and Linux
  • All future updates included
Ready to start?

Design faster. Pay less.
Download today.

Join optical engineers who refused to pay enterprise prices for the tools they use every day. Get full access in minutes.

Get Trefoila — $49/mo →
Complete Feature Reference

Everything that's included.

Lens Editor
  • Spherical, conic, aspheric surfaces
  • Zernike freeform surfaces
  • 8+ surface types total
  • Row-and-column prescription editor
  • Live paraxial update (EFL, BFL, f/#, NA)
  • Entrance & exit pupil, cardinal points
  • Surface solves: marginal ray, chief ray, quick focus
Glass & Materials
  • 1,500+ glasses: Schott, Ohara, Hoya, CDGM, Hikari
  • Sellmeier dispersion model
  • Interactive nd–Vd glass map (Abbe diagram)
  • Wavelength transmission curves
  • Custom glass entry
  • Multi-wavelength ray tracing (F, d, C + custom)
2D / 3D Visualization
  • Real-time 2D cross-section layout
  • Multi-field, multi-wavelength ray fan overlay
  • Vignetting visualization
  • Aperture stop & pupil location markers
  • 3D interactive view
  • Export layout as SVG or PNG
Image Quality Analysis
  • MTF — FFT wave-optics, polychromatic
  • Through-focus MTF
  • PSF — wave-optics via FFT, Strehl ratio
  • Spot diagrams — full field × wavelength grid
  • RMS radius, geometric radius, Airy disk overlay
  • Wavefront OPD fan plots (tangential & sagittal)
  • Zernike decomposition — 11 Noll terms
  • Ray fan diagrams — chromatic, tangential, sagittal
  • Seidel aberration coefficients — surface by surface
Optimization
  • Damped Least Squares (Levenberg-Marquardt)
  • Differential Evolution (global search)
  • Nelder-Mead simplex
  • JAX autodiff — exact analytic gradients
  • Composable merit function
  • Weighted operands
  • Edge thickness, center thickness constraints
  • Clearance constraints
Tolerancing
  • Monte Carlo simulation (1,000+ trials)
  • 5 tolerance types: radius, thickness, tilt, decenter, index
  • Sensitivity analysis — ranked bar chart
  • Inverse sensitivity — automatic budget allocation
  • Yield estimation from Monte Carlo histogram
  • Manufacturing-ready tolerance reports
Platform & Integration
  • macOS, Windows, Linux
  • Python-native API
  • GPU acceleration via JAX
  • NumPy / SciPy compatible
  • Export data as CSV
  • Scriptable — automate anything
  • Instant download, no procurement
  • Free updates included