Skip to content

Latest commit

 

History

History
64 lines (42 loc) · 2.58 KB

Simulations with lenses.md

File metadata and controls

64 lines (42 loc) · 2.58 KB

Diffraction Simulations with Lenses

These examples correspond to the simulations with lenses, whose explanation can be found in this video. A further discussion and its mathematical background can be found in this article.

Installation

pip install diffractsim

Alternatively, to download the examples and the apertures as well, you can also build from source by cloning the repository and running from the main folder project on the command prompt:

python setup.py install

Simulations

To perform the simulations, just run from the examples subdirectory the corresponding Python scripts on the command prompt:

python bahtinov_mask.py

animation

python optical_imaging_system.py

animation

python object_behind_the_lens.py

animation

python spatial_filter.py

animation

python hexagonal_aperture_lens.py

animation

python circular_aperture_lens.py

animation

python beyond_the_focal_length.py

animation

The scripts uploaded only render the diffraction pattern at a single screen distance. If you want to create an animation, you must loop through the different distances and then merging the rendered frames to a video, for example, using FFmpeg.