Dynamic Holographic Optical Tweezers
Real-time computation and visualization of holographic phase masks for optical tweezers systems. Implements the weighted Gerchberg-Saxton algorithm for shaping laser beams into multiple focused traps to manipulate microscopic particles.
Business Context
Optical tweezers use tightly focused laser beams to trap and manipulate microscopic particles — cells, beads, molecules. A single focused beam creates one trap. Creating multiple independently positioned traps from a single laser requires computing holographic phase masks that split and redirect the beam through a spatial light modulator. The computational challenge: finding the optimal phase distribution that produces uniform trapping force across all desired positions.
Strategic Value
The weighted Gerchberg-Saxton algorithm computes phase masks through iterative Fourier transform cycling, with intensity weighting ensuring uniform trapping force. Real-time computation enables interactive trap positioning via WebSocket communication. The application supports 6 Zernike aberration modes for simulating optical system imperfections. Originally developed at CEFOP (Center for Optics and Photonics), Universidad de Concepción. Modernized as Python/FastAPI with HTML5 Canvas visualization.
The Challenge
Optical tweezers require precise phase masks computed in real-time to create multiple independently positioned laser traps. The Gerchberg-Saxton algorithm involves iterative Fourier transforms that must converge quickly for interactive manipulation of microscopic particles.
Our Approach
Weighted Gerchberg-Saxton iterative Fourier-transform method for multi-trap phase mask computation. Python/FastAPI backend with HTML5 Canvas visualization, REST API + WebSocket communication for real-time interaction. Originally developed at CEFOP, Universidad de Concepción.
Key Performance Indicators
| KPI | Baseline | Result | Impact |
|---|---|---|---|
| Phase Computation | Offline computation | Real-time iterative GS algorithm | Interactive trap positioning |
| Trap Configuration | Single fixed trap | Multiple independently positioned traps | Flexible particle manipulation |
Architecture
cefop dinhot
Trapping Light
Optical tweezers use a tightly focused laser beam to trap microscopic particles — cells, beads, molecules. The radiation pressure gradient near the focus creates a stable 3D potential well that holds the particle in place. Moving the focus moves the trapped object. One beam, one trap.
The challenge: creating multiple independently positioned traps from a single laser. The solution is a spatial light modulator (SLM) — a device that reshapes the wavefront without changing amplitude. The SLM displays a computed phase mask that splits the beam into multiple focal points, each capable of trapping a particle independently.
Computing the Phase Mask
The weighted Gerchberg-Saxton algorithm computes phase masks through iterative Fourier transform cycling: start with desired trap positions, inverse FFT to the SLM plane (extract phase, replace amplitude with uniform beam), forward FFT to focal plane (extract phase, replace amplitude with desired pattern), repeat. The weighting adjusts trap intensities at each iteration to ensure uniform trapping force — without it, outer traps tend to be weaker.
Convergence typically requires 10–50 iterations. The result: a phase pattern that, when displayed on the SLM, creates multiple laser foci at precisely specified positions in 3D space.
The application provides real-time phase mask computation with WebSocket communication for low-latency browser interaction, HTML5 Canvas visualization of phase patterns and simulated focal planes, and 6 Zernike aberration modes for simulating optical system imperfections. Originally developed at CEFOP (Center for Optics and Photonics), Universidad de Concepción.
Technology Stack
Application Screenshots

Technical Diagrams
dinhot fourier optics
dinhot gs algorithm
dinhot trap types
gs phase overflow