Project page: https://alexin.cclaude.rocks/projects/reflectorml/
Free-form reflector design is essential in optics for precisely shaping light distributions, with applications in automotive lighting, energy-efficient LED optics, laser-based manufacturing, aerospace systems, and medical imaging.
This problem is mathematically formulated as a non-linear Monge-Ampère equation (Wikipedia), which defines the mapping between a given light source and a prescribed target intensity.
-
$\varphi$ : convex potential$\Omega \rightarrow \mathbb{R}$ -
$D^2\varphi$ : Hessian of$\varphi$ -
$f$ : source density on$\Omega$ -
$g$ : target density at$y=\nabla\varphi(x)$
However, traditional numerical solvers for this equation are computationally expensive and often struggle with convergence, particularly in complex boundary conditions. Developing efficient and robust methods to solve this problem is crucial for advancing high-performance optical designs in both scientific and industrial applications.
By embedding the governing equations - such as the Monge-Ampère equation - directly into the learning process, our approach ensures physically consistent solutions while significantly reducing computational costs. Unlike purely data-driven models, PINNs do not rely solely on labeled data but instead enforce optical constraints during training, improving solution accuracy for specific problem instances. This framework accelerates the inverse design process and provides a computationally efficient alternative to traditional numerical solvers.
This project implements a hybrid method that aims to use both:
- PyTorch raytracer (with automatic differentiation) with a transport loss
- Physical loss based on the Monge-Ampere equation.
This repository contains six parallel implementations of the same reflector problem,
sharing one pipeline in reflectorml/core/ and differing only in network parameterization:
| Directory | Approach | Network | Network output | Monge-Ampère loss |
|---|---|---|---|---|
reflectorml/impls/siren/ |
SIREN scalar potential | MirrorSurface (SIREN) |
Scalar potential phi(x) |
Hessian of phi |
reflectorml/impls/icnn/ |
Input Convex Neural Network potential | MirrorSurface (ICNN) |
Scalar potential phi(x) |
Hessian of phi |
reflectorml/impls/spd_field/ |
Gradient-field | MirrorSurface (SIREN) |
SPD Jacobian J(x) = D^2 phi |
Jacobian of the map + curl-free penalty |
reflectorml/impls/hycnn/ |
Hyper Input Convex NN potential | MirrorSurface (HyCNN) |
Scalar potential phi(x) |
Hessian of phi |
reflectorml/impls/hinge/ |
Smoothed-hinge potential (frozen ridges + linear readout) | MirrorSurface (hinges) |
Scalar potential phi(x) |
Hessian of phi |
reflectorml/impls/quad_zernike/ |
Zernike spectral potential | MirrorSurface (Zernike) |
Scalar potential phi(x) |
Hessian of phi |
Run each implementation from the repository root (library shapes and tests are shared):
make
python -m reflectorml.core.main --impl siren # potential-based
python -m reflectorml.core.main --impl icnn # ICNN potential
python -m reflectorml.core.main --impl spd_field # gradient-field
python -m reflectorml.core.main --impl hycnn # HyCNN potential
python -m reflectorml.core.main --impl hinge # hinge potential
python -m reflectorml.core.main --impl quad_zernike # Zernike potentialEnsure you have the following installed:
- Python 3.7 or higher
- Required libraries (listed in
requirements.txt)
Clone the repository:
git clone https://github.com/Alexin-CH/ReflectorML.git
cd ReflectorMLInstall the required dependencies:
makeEach implementation documents its results in its own README:
- siren/ — SIREN scalar potential
- icnn/ — ICNN scalar potential
- spd_field/ — gradient-field (SPD Jacobian)
This project is inspired by several papers:
- "A Neural Network Approach for Solving the Monge-Ampère Equation with Transport Boundary Condition"
You can read the paper here. - "Input Convex Neural Networks"
You can read the paper here - "Convex Physics Informed Neural Networks for the Monge-Ampère Optimal Transport Problem"
You can read the paper here