Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 1.6 KB

README.md

File metadata and controls

38 lines (25 loc) · 1.6 KB

Fraunhofer diffraction on an arbitrary hole

Method

The goal is to calculate integral

for some set of directions s.

General idea is to approximate hole by a set of squares. grid
For each square of size a x b with center at (0, 0) solution is trivial:

Solutions for each square are summarized with regard to phase difference. Note that geometric center of hole is considered as point with zero field initial phase.

Usage

Red, green, blue, yellow, magneta, cyan and fancy(just try it) colors are availbale. If no color is specified white color will be used.

Run

python3 diffraction.py %colorname

Then draw contour of hole and press "finish".

For higher resolution change variable color_grid_size from 300 to 600. Note that it will slow down calculations.

Examples

Diffraction on square with no color specified:

boring

Diffraction on curved rhombus in yellow:

yellow

Diffraction on triangle in fancy style:

beautiful