{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 4: DIFFRACTION" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.1: Diffraction_at_a_single_slit.sci" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex4.1 : Page-91 (2010)\n", "D = 50; // Distance between source and the screen, cm\n", "lambda = 6563e-008; // Wavelength of light of parallel rays, m\n", "d = 0.385e-01; // Width of the slit, cm\n", "n = 1; // Order of diffraction for first minimum\n", "// As sin(theta1) = n*lambda/d = x1/D, solving for x1\n", "x1 = n*lambda*D/d; // Distance from the centre of the principal maximum to the first minimum, cm\n", "printf('\nThe Distance from the centre of the principal maximum to the first minimum = %4.2f mm', x1/1e-001);\n", "n = 5; // Order of diffraction for fifth minimum\n", "x2 = n*lambda*D/d; // Distance from the centre of the principal maximum to the fifth minimum, cm\n", "printf('\nThe Distance from the centre of the principal maximum to the fifth minimum = %4.2f mm', x2/1e-001);\n", "\n", "// Result \n", "// The Distance from the centre of the principal maximum to the first minimum = 0.85 mm\n", "// The Distance from the centre of the principal maximum to the fifth minimum = 4.26 mm" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.2: Diffraction_at_a_circular_aperture.sci" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex4.2 : Page-91 (2010)\n", "D = 0.04; // Diameter of circular aperture, cm\n", "f = 20; // Focal length of convex lens, cm\n", "lambda = 6000e-008; // Wavelength of light used, m\n", "// We have sin(theta) = 1.22*lambda/D = theta, for small theta, such that\n", "// For first dark ring\n", "theta = 1.22*lambda/D; // The half angular width at central maximum, rad\n", "r1 = theta*f; // The half width of central maximum for first dark ring, cm\n", "// We have sin(theta) = 5.136*lambda/(%pi*D) = theta, for small theta, such that\n", "// For second dark ring\n", "theta = 5.136*lambda/(%pi*D); // The half angular width at central maximum, rad\n", "r2 = theta*f; // The half width of central maximum for second dark ring, cm\n", "printf('\nThe radius of first dark ring = %4.2e cm', r1);\n", "printf('\nThe radius of second dark ring = %4.1e cm', r2);\n", "\n", "// Result \n", "// The radius of first dark ring = 3.66e-002 cm\n", "// The radius of second dark ring = 4.90e-002 cm" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.3: Second_order_maximum_for_diffraction_grating.sci" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex4.3 : Page-91 (2010)\n", "n = 2; // Order of diffraction\n", "lambda = 650e-009; // Wavelength of light used, m\n", "d = 1.2e-05; // Distance between two consecutive slits of grating, m\n", "// We have sin(theta) = n*N*lambda = n*lambda/d, solving for theta\n", "theta = asind(n*lambda/d); // Angle at which the 650 nm light produces a second order maximum, degrees\n", "printf('\nThe angle at which the 650 nm light produces a second order maximum = %4.2f degrees', theta);\n", "\n", "// Result \n", "// The angle at which the 650 nm light produces a second order maximum = 6.22 degrees " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.4: The_highest_spectral_order_with_diffraction_grating.sci" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex4.4 : Page-92 (2010)\n", "lambda = 650e-009; // Wavelength of light used, m\n", "N = 6000e+02; // Number of lines per m on grating, per m\n", "theta = 90; // Angle at which the highest spectral order is obtained, degrees\n", "// We have sin(theta) = n*N*lambda, solving for n\n", "n = sind(theta)/(N*lambda); // The highest order of spectra with diffraction grating\n", "printf('\nThe highest order of spectra obtained with diffraction grating = %1d', n);\n", "\n", "// Result \n", "// The highest order of spectra obtained with diffraction grating = 2" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.5: Overlapping_spectra_with_diffraction_grating.sci" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex4.5 : Page-92 (2010)\n", "N = 4000e+02; // Number of lines per m on grating, per m\n", "// For Blue Line\n", "lambda = 450e-009; // Wavelength of blue light, m\n", "n = 3; // Order of diffraction spectrum\n", "// We have sin(theta) = n*N*lambda, solving for sin(theta)\n", "sin_theta_3 = n*N*lambda; // Sine of angle at third order diffraction \n", "// For Red Line\n", "lambda = 700e-009; // Wavelength of blue light, m\n", "n = 2; // Order of diffraction spectrum\n", "// We have sin(theta) = n*N*lambda, solving for sin(theta)\n", "sin_theta_2 = n*N*lambda; // Sine of angle at second order diffraction\n", "// Check for overlapping\n", "if abs(sin_theta_3 - sin_theta_2) < 0.05 then\n", " printf('\nThe two orders overlap.');\n", "else\n", " printf('\nThe two orders do not overlap.');\n", "end\n", "\n", "// Result \n", "// The two orders overlap. " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.6: Width_of_first_order_spectrum.sci" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex4.6 : Page-93 (2010)\n", "n = 1; // Order of diffraction spectrum\n", "N = 6000e+02; // Number of lines per m on diffraction grating, per m\n", "D = 2; // Distance of screen from the source, m\n", "lambda1 = 400e-009; // Wavelength of blue light, m\n", "// We have sin(theta1) = n*N*lambda, solving for theta1\n", "theta1 = asind(n*N*lambda1); // Angle at first order diffraction for Blue light, degrees\n", "lambda2 = 750e-009; // Wavelength of blue light, m\n", "// We have sin(theta2) = n*N*lambda, solving for theta2\n", "theta2 = asind(n*N*lambda2); // Angle at first order diffraction for Red light, degrees\n", "x1 = D*tand(theta1); // Half width position at central maximum for blue color, m\n", "x2 = D*tand(theta2); // Half width position at central maximum for red color, m\n", "\n", "printf('\nThe width of first order spectrum on the screen = %4.1f cm', (x2 - x1)/1e-02);\n", "\n", "// Result \n", "// The width of first order spectrum on the screen = 51.3 cm " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.7: Resolution_of_wavelengths_for_grating.sci" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex4.7 : Page-93 (2010)\n", "w = 5; // Width of the grating, cm\n", "N = 320; // Number of lines per cm on grating, per cm\n", "N0 = w*N; // Total number of lines on the grating\n", "lambda = 640; // Wavelength of light, nm\n", "n = 2; // Order of diffraction\n", "d_lambda = lambda/(n*N0); // Separation between wavelengths which the gratign can just resolve, nm\n", "printf('\nThe separation between wavelengths which the grating can just resolve = %3.1f nm', d_lambda);\n", "\n", "// Result \n", "// The separation between wavelengths which the grating can just resolve = 0.2 nm" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.8: Angular_separation_to_satisfy_Rayleigh_criterion.sci" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex4.8 : Page-93 (2010)\n", "lambda = 550e-09; // Wavelength of light, m\n", "D = 3.2e-02; // Diameter of circular lens, m\n", "f = 24e-02; // Focal length of the lens, m \n", "theta_min = 1.22*lambda/D; // Minimum angle of resolution provided by the lens, rad\n", "// As delta_x/f = theta_min, solving for delta_x\n", "delta_x = theta_min*f; // Separation of the centres of the images in the focal plane of lens, m\n", "printf('\nThe separation of the centres of the images in the focal plane of lens = %1d micro-metre', delta_x/1e-06);\n", "\n", "// Result \n", "// The separation of the centres of the images in the focal plane of lens = 5 micro-metre" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.9: Linear_separation_between_two_points.sci" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex4.9 : Page-94 (2010)\n", "lambda = 550e-09; // Wavelength of light, m\n", "D = 20e-02; // Diameter of objective of telescope, m\n", "d = 6e+003; // Distance of two points from the objective of telescope, m\n", "theta = 1.22*lambda/D; // Angular separation between two points, rad\n", "x = theta*d; // Linear separation between two points, m\n", "printf('\nThe linear separation between two points = %5.2f mm', x/1e-03);\n", "\n", "// Result \n", "// The linear separation between two points = 20.13 mm" ] } ], "metadata": { "kernelspec": { "display_name": "Scilab", "language": "scilab", "name": "scilab" }, "language_info": { "file_extension": ".sce", "help_links": [ { "text": "MetaKernel Magics", "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" } ], "mimetype": "text/x-octave", "name": "scilab", "version": "0.7.1" } }, "nbformat": 4, "nbformat_minor": 0 }