← Back to project catalogue
GP-PH-15XE4K0PhysicsOpen for request

Optical ray-tracing and lens optimisation

An optical-design workbench for tracing rays through rotationally symmetric lens systems and optimising selected imaging performance measures.

  • Nuxt
  • Vue
  • FastAPI
  • PostgreSQL
  • Python
  • NumPy
  • SciPy
  • Three.js
  • Docker

Project definition

Problem statement

Changing lens curvature, thickness, spacing, glass, aperture, or image plane affects focus, aberrations, field performance, manufacturability, and cost in interacting ways.

The physics and numerical problem is to implement Snell-law ray tracing correctly, define a bounded merit function, optimise without invalid geometries, and verify results against analytical and published reference systems.

Project objectives

  • Model rotationally symmetric spherical and selected aspheric surfaces, thicknesses, apertures, stops, and image planes.
  • Implement paraxial and exact meridional or skew ray tracing with refractive-index dispersion.
  • Calculate focal properties, ray fans, spot diagrams, distortion, field curvature, and selected aberration proxies.
  • Optimise selected radii, spacings, and image position under physical and manufacturing constraints.
  • Verify ray intersections, refraction, focus, and optimisation against known cases.

System design

System modules

01

Optical system editor

Defines surfaces, curvature, conic or aspheric terms, thickness, material, aperture, stop, fields, and wavelengths.

02

Ray-tracing engine

Calculates surface intersections, normals, refraction, total internal reflection, propagation, and image-plane hits.

03

Paraxial analyser

Calculates effective focal length, principal planes, pupil quantities, magnification, and first-order checks.

04

Image-quality analyser

Produces spot diagrams, ray fans, focus curves, distortion, field, and wavelength comparisons.

05

Optimisation workbench

Applies bounded variables, constraints, merit terms, local or global methods, and iteration history.

Methodology

System workflow

  1. 01
    Load optical system

    The student selects a prepared singlet, doublet, telescope, or camera objective and its fields and wavelengths.

  2. 02
    Verify baseline

    Paraxial and exact rays are traced and checked for valid intersections, refraction, and apertures.

  3. 03
    Measure performance

    Focus, spots, ray errors, distortion, and field and wavelength behaviour form the baseline.

  4. 04
    Optimise

    Selected design variables change within curvature, thickness, spacing, aperture, and material constraints.

  5. 05
    Compare design

    Before and after systems are compared for merit, image quality, constraint margins, and sensitivity.

Demonstration scenario

A prepared achromatic doublet is traced at three wavelengths and several field angles. The baseline shows longitudinal colour and off-axis spot growth. The optimiser adjusts selected curvatures and image position, then the workbench compares ray diagrams, spot sizes, focus, merit, and constraint margins.

Engineering

Technical architecture

Web application
Nuxt, Vue, and Three.js for system editing, ray diagrams, spot plots, focus curves, and comparison.
Optics API
FastAPI for systems, ray jobs, analyses, optimisation, tolerances, results, and exports.
Data layer
PostgreSQL for system versions, surfaces, glasses, fields, wavelengths, runs, and metrics.
Numerical engine
Python, NumPy, and SciPy for geometry, Snell refraction, dispersion, paraxial matrices, merit functions, and optimisation.
Verification
Planar-interface, spherical-surface, thin-lens, paraxial, reversibility, and prepared reference-system tests.

Testing

Evaluation

Evaluation measures

  • Ray-intersection and refraction error against analytical cases
  • Paraxial focal-property agreement with thin-lens and matrix calculations
  • Spot, focus, and distortion agreement with prepared reference systems
  • Merit-function improvement while satisfying geometry and aperture constraints
  • Optimisation repeatability and sensitivity to initial design and variable bounds
  • Trace and optimisation time across surfaces, fields, wavelengths, rays, and iterations

System boundaries

  • The first version models rotationally symmetric geometrical optics and selected aberration measures.
  • Diffraction, polarisation, scattering, coatings, stray light, thermal effects, tolerancing, and full manufacturability are outside the initial scope.
  • Optimised results require independent optical software checks, tolerance analysis, and physical testing.
  • The software does not provide laser-safety evaluation or instructions for unsafe optical exposure.

Included

  1. 01Lens surface, material, field, wavelength, and aperture interface
  2. 02Paraxial, exact-ray, aberration, and optimisation modules
  3. 03Ray, spot, focus, distortion, and performance visualisations
  4. 04Prepared optical systems, reference cases, and results
  5. 05Complete source code in a private GitHub repository
  6. 06Complete project documentation with synopsis, abstract, methodology, optical diagrams and equations, optimisation results, screenshots, and conclusion
  7. 07Setup and usage guide

Project record

No buyer information is collected on this page.

Permanent project ID
GP-PH-15XE4K0
Catalogued
21 Aug 2026
Completed
Pending
Verified
Pending
Demonstration
Added when ready

Handover

After purchase

  1. 01
    Payment is confirmed

    The project is marked unavailable and cannot be purchased again.

  2. 02
    Repository access is granted

    The buyer's submitted GitHub account receives access to the private repository.

  3. 03
    The purchase record is delivered

    The certification sheet is prepared from the reviewed buyer details and sent privately by email.