Code Monkey home page Code Monkey logo

fraunhofer-pattern's Introduction

Fraunhofer-pattern

Problem

Use a Matplotlib gridspec to plot the Fraunhofer pattern of a 2 rectangle aperture.

Solution

The used solution is

$$ u_z(x_z, y_z)\propto \exp\left(j\frac{\pi}{\lambda Z}(x_z^2+y_z^2)\right) 4hw \mbox{ sinc}\left(\dfrac{2 x_z w}{\lambda Z} \right) \cos\left(\dfrac{2\pi x_z d}{\lambda Z}\right) \mbox{sinc}\left(\dfrac{y_z h}{\lambda Z} \right) $$

where $x_z$ and $y_z$ are the coordinates on the screen, $Z$ is the distance from the object to the screen and $\lambda$ is the wavelength of the light.

Plot

The plotted pattern will be given by

$$ I_z (x_z, y_z) \propto \left| u_z(x_z, y_z) \right|^2 $$

When executed, the Python 3 script Fraunhofer-difraction.py will produce the following output:

ย 

The parameters used in this case are:

$$ \begin{array}{rcr} Z&=&1\mbox{ m},\\ w&=&0.1\times 10^{-3}\mbox{ m},\\ h&=&5\times 10^{-3}\mbox{ m},\\ d&=&0.7\times 10^{-3}\mbox{ m},\\ \lambda&=&500\times 10^{-9}\mbox{ m}.\\ \end{array} $$

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.