Skip to content

vovaf709/diffraction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Fraunhofer diffraction

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages