Skip to content

Latest commit

 

History

History
95 lines (62 loc) · 2.03 KB

README.md

File metadata and controls

95 lines (62 loc) · 2.03 KB

LensSim

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.

Gallery

Spectral Rendering with Image Based Lighting(IBL)

Rendering of double gauss lens(data/dgauss50mm.json).

You can see some aberrations like chromatic aberration, and lens flare.

see src/main.cpp

Optical Path Diagram

see python/example.py

Spot Diagram

Spot Diagram of data/dgauss50mm.json

Geometric PSF

Geometric Point Spread Function(PSF) of data/dgauss50mm.json

Features

  • 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)

Supported Lens Element

  • Aperture
  • Spherical Lens
  • Aspheric Lens

Requirements

  • C++17
  • CMake 3.12 or Higher

Setup

git submodule update --init

Build

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make

Python Binding

See python/example.py

Externals