LensSim is a C++ library and GUI tool for photographic lens system.
It's goal is to make C++ library for optical computations in lens design, and make user-friendly Python GUI tool to help lens design tasks.
LensSim can simulate image of photographic lens with Image Based Lighting(IBL) by Montecarlo Light Transportation.
Rendering of double gauss lens(data/dgauss50mm.json
).
You can see some aberrations like chromatic aberration, and lens flare.
see src/main.cpp
see python/example.py
Spot Diagram of data/dgauss50mm.json
Geometric Point Spread Function(PSF) of data/dgauss50mm.json
- Ray Tracing
- Focusing
- Sampling Ray from Exit Pupil
- Vignetting
- Lens Flare
- Chromatic Aberration
- Paraxial Ray Tracing
- Spectral Rendering with IBL
- Python Binding
- Spot Diagram
- Geometric Point Spread Function(PSF)
- Geometric Optical Transfer Function(OTF), Modulation Transfer Function(MTF)
- Wavefront Aberration
- Zernike Polynomial
- Diffraction Point Spread Function(PSF)
- Diffraction Optical Transfer Function(OTF), Modulation Transfer Function(MTF)
- Aperture
- Spherical Lens
- Aspheric Lens
- C++17
- CMake 3.12 or Higher
git submodule update --init
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
See python/example.py
- progschj/ThreadPool - zlib License
- nlohmann/json - MIT License
- nothings/stb - Public Domain or MIT License
- syoyo/tinyexr - 3-clause BSD License
- pybind/pybind11 - BSD-style license