diff options
Diffstat (limited to 'Engineering_Physics_by_V_Yadav/3-Diffraction.ipynb')
-rw-r--r-- | Engineering_Physics_by_V_Yadav/3-Diffraction.ipynb | 1494 |
1 files changed, 1494 insertions, 0 deletions
diff --git a/Engineering_Physics_by_V_Yadav/3-Diffraction.ipynb b/Engineering_Physics_by_V_Yadav/3-Diffraction.ipynb new file mode 100644 index 0000000..4eb1e2e --- /dev/null +++ b/Engineering_Physics_by_V_Yadav/3-Diffraction.ipynb @@ -0,0 +1,1494 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Diffraction" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.10: Slit_width_in_Fraunhoffer_single_slit_experiment.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.10:: Page-3.24 (2009)\n", +"clc; clear;\n", +"f = 250; // Focal length of the lens, cm\n", +"x = 0.8; // Half width of central maxima, cm\n", +"lambda = 5500e-008; // Wavelength of light used, cm\n", +"// As x = f*lambda/a, solving for a\n", +"a = f*lambda/x; // Slit width in Fraunhofer single slit experiment\n", +"\n", +"printf('\nThe slit width = %5.3f cm', a);\n", +"\n", +"// Result \n", +"// The slit width = 0.017 cm " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.11: Half_angular_width_of_central_maxima.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.11:: Page-3.25 (2009)\n", +"clc; clear;\n", +"lambda = 5500e-008; // Wavelength of light used, cm\n", +"a = 8.5e-005; // Width of the slit, cm\n", +"n = 1; // Order of diffraction\n", +"// For a single slit Fraunhofer diffraction, a*sind(theta) = n*lambda, solving for theta\n", +"theta = asind(n*lambda/a); // Half angular width at central maximum in Fraunhoffer diffraction, degrees\n", +"\n", +"printf('\nThe half angular width at central maximum in Fraunhoffer diffraction = %4.1f degrees', theta);\n", +"\n", +"// Result \n", +"// The half angular width at central maximum in Fraunhoffer diffraction = 40.3 degrees " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.12: Wavelength_of_light_used_in_Fraunhoffer_diffraction_due_to_single_slit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.12:: Page-3.25 (2009)\n", +"clc; clear;\n", +"a = 0.04; // Slit width, cm\n", +"x = 0.5; // Half width of central maximum, cm\n", +"f = 300; // Focal length of the lens, cm\n", +"// As x = lambda*f/a, solving for lambda\n", +"lambda = a*x/f; // Wavelength of light used in Fraunhoffer diffraction due to single slit, cm\n", +"\n", +"printf('\nThe wavelength of light used in Fraunhoffer diffraction due to a single slit = %4d angstrom', lambda/1e-008);\n", +"\n", +"// Result \n", +"// The wavelength of light used in Fraunhoffer diffraction due to a single slit = 6666 angstrom " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.13: Width_of_central_maxima_from_position_of_first_secondary_minima.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.13:: Page-3.25 (2009)\n", +"clc; clear;\n", +"a = 0.045; // Slit width, cm\n", +"lambda = 5500e-008; // Wavelength of light used, cm\n", +"f = 250; // Focal length of the lens, cm\n", +"x = lambda*f/a; // Position of central maxima, cm\n", +"\n", +"printf('\nThe position of central maxima = %5.3f cm', x);\n", +"printf('\nThe width of central maxima from first minima = %5.3f cm', 2*x);\n", +"\n", +"// Result \n", +"// The position of central maxima = 0.306 cm\n", +"// The width of central maxima from first minima = 0.611 cm " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.14: Wavelength_of_monochromatic_light_used_in_illuminating_a_slit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.14:: Page-3.26 (2009)\n", +"clc; clear;\n", +"a = 0.025; // Slit width, cm\n", +"n = 2; // Order of diffraction\n", +"f = 400; // Focal length of the lens, cm\n", +"x = 2.1; // Position of central maxima, cm\n", +"// As theta = n*lambda/a and theta = x/f, solving for lambda\n", +"lambda = x*a/(n*f); // Wavelength of light used, cm\n", +"printf('\nThe wavelength of light used = %4d angstrom', lambda/1e-008);\n", +"\n", +"// Result \n", +"// The wavelength of light used = 6562 angstrom " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.15: Distance_between_second_dark_and_next_bright_fringe_on_the_axes.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.15:: Page-3.26 (2009)\n", +"clc; clear;\n", +"a = 0.25; // Slit width, cm\n", +"lambda = 5890e-008; // Wavelength of light, cm\n", +"f = 80; // Focal length of the lens, cm\n", +"n = 2; // Order of diffraction\n", +"// As for minima, theta = n*lambda/a and theta = x/f, solving for x\n", +"x2 = 2*lambda*f/a; // Position of 2nd dark fringe, cm\n", +"// As for maxima, theta = (2*n+1)*lambda/(2*a) and theta = x/f, solving for x\n", +"x2_prime = 5*lambda*f/(2*a); // Position of 2nd bright fringe, cm\n", +"delta_x = x2_prime-x2; // Distance between 2nd dark and next bright, cm\n", +"printf('\nThe distance between 2nd dark and next bright fringe = %4.2e cm', delta_x);\n", +"\n", +"// Result \n", +"// The distance between 2nd dark and next bright fringe = 9.42e-003 cm " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.16: Width_of_the_slit_from_first_order_diffractio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.16:: Page-3.27 (2009)\n", +"clc; clear;\n", +"lambda = 5500e-008; // Wavelength of light used, cm\n", +"x = 3.9e-001; // Half width of central maximum, cm\n", +"f = 220; // Focal length of the lens, cm\n", +"n = 1; // Order for first order diffraction\n", +"// As a*sin(theta) = n*lambda, a*theta = n*lambda\n", +"// As theta = lambda/a and theta = x/f, solving for a\n", +"a = lambda*f/x; // Half angular width at central maximum, cm\n", +"\n", +"printf('\nThe width of the slit = %3.1e cm', a);\n", +"\n", +"// Result \n", +"// The width of the slit = 3.1e-002 cm " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.18: Fraunhoffer_diffraction_due_to_double_slits.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.18:: Page-3.30 (2009)\n", +"clc; clear;\n", +"a = 0.019e-003; // Width of each slit, m\n", +"b = 2.0e-004; // Width of opacity between two slits, m\n", +"lambda = 5000e-010; // Wavelengh of light used, m\n", +"D = 0.6; // Distance between slit and the screen, m\n", +"// As angular separation, theta = x/D = lambda/(a+b), solving for x\n", +"x = D*lambda/(a+b); // Fringe spacing on the screen, m\n", +"// As half angular separation, theta1 = x1/D = lambda/(2*(a+b)), solving for x1\n", +"x1 = D*lambda/(2*(a+b)); // Distance between central maxima and first minima, m\n", +"\n", +"printf('\nThe fringe spacing on the screen = %4.2f mm', x/1e-003);\n", +"printf('\nThe distance between central maxima and first minima = %4.2f mm', x1/1e-003);\n", +"\n", +"// Result \n", +"// The fringe spacing on the screen = 1.37 mm\n", +"// The distance between central maxima and first minima = 0.68 mm " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.19: Fringe_separation_in_Fraunhoffer_double_slit_diffraction_pattern.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.19:: Page-3.31 (2009)\n", +"clc; clear;\n", +"f = 150; // Distance between screen and slit, cm\n", +"a = 0.005; // Slit width, cm\n", +"b = 0.06; // Distance between slits, cm\n", +"lambda = 5500e-008; // Wavelength of light used, cm\n", +"// As half angular separation, theta1 = x1/f = lambda/(2*(a+b)), solving for x1\n", +"x1 = f*lambda/(2*(a+b)); // Distance between central maxima and first minima, cm\n", +"delta_theta = lambda/(2*(a+b)); // Angular separation between two consecutive minima, radians\n", +"printf('\nThe distance between central maxima and first minima = %4.2e cm', x1);\n", +"printf('\nThe angular separation between two consecutive minima = %3.1e radians', delta_theta);\n", +"\n", +"// Result \n", +"// The distance between central maxima and first minima = 6.35e-002 cm\n", +"// The angular separation between two consecutive minima = 4.2e-004 radians " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1: Position_of_the_screen_so_that_light_is_focused_on_the_brightest_spot.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.1:: Page-3.9 (2009)\n", +"clc; clear;\n", +"lambda = 5890e-008; // Wavelength of light used, cm\n", +"r1 = 0.2; // Radius of first ring of zone plate, cm\n", +"n = 1; // Order of zone plate\n", +"f1 = r1^2/(n*lambda); // Position of the screen so that light is focused on the brightest spot, cm\n", +" \n", +"printf('\nThe position of the screen so that light is focused on the brightest spot = %3.1e cm', lambda);\n", +"\n", +"// Result \n", +"// The position of the screen so that light is focused on the brightest spot = 5.9e-005 cm " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.20: Positions_of_first_secondary_maxima_and_minima_in_double_slit_diffraction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.20:: Page-3.32 (2009)\n", +"clc; clear;\n", +"f = 120; // Distance between screen and slit, cm\n", +"a = 0.019; // Slit width, cm\n", +"b = 0.041; // Distance between slits, cm\n", +"lambda = 6500e-008; // Wavelength of light used, cm\n", +"// As theta1 = x1/f = lambda/(2*(a+b)), solving for x1\n", +"x1 = f*lambda/(2*(a+b)); // Position of first secondary minima, cm\n", +"// As theta2 = x2/f = lambda/(a+b), solving for x2\n", +"x2 = f*lambda/(a+b); // Position of first secondary maxima, cm\n", +"\n", +"printf('\nThe position of first secondary minima = %5.3f cm', x1);\n", +"printf('\nThe position of first secondary maxima = %4.2f cm', x2);\n", +"\n", +"// Result \n", +"// The position of first secondary minima = 0.065 cm\n", +"// The position of first secondary maxima = 0.13 cm " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.21: Missing_orders_of_spectra_in_Fraunhoffer_double_slit_diffraction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.21:: Page-3.34 (2009)\n", +"clc; clear;\n", +"a = 0.2; // Slit width, mm\n", +"b = 0.8; // Distance between slits, mm\n", +"p = [1 2 3 4]; // Orders of pth diffraction maxima\n", +"// As diffraction of pth diffraction maxima, a*sin(theta)=p*lambda --- (i)\n", +"// and that of nth diffraction maxima, (a+b)*sin(theta)=n*lambda --- (ii)\n", +"// Dividing (ii) by (i), we have\n", +"// (a+b)/a = n/p, solving for n\n", +"n = (a+b)/a*p; // Orders of nth diffraction maxima\n", +"\n", +"printf('\nThe missing orders of spectra in diffraction maxima, n = %d, %d, %d, %d,...', n(1), n(2), n(3), n(4));\n", +"\n", +"\n", +"// Result \n", +"// The missing orders of spectra in diffraction maxima, n = 5, 10, 15, 20,... " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.22: Angles_of_diffraction_for_the_principal_maxima_for_two_lines_of_sodium.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.22:: Page-3.45 (2009)\n", +"clc; clear;\n", +"lambda1 = 5890e-008; // Wavelength of D1 line of Na, cm\n", +"lambda2 = 5896e-008; // Wavelength of D2 line of Na, cm\n", +"N = 3000/0.5; // No. of lines per cm of grating, lines/cm\n", +"a_plus_b = 1/N; // Grating element, cm\n", +"n = 1; // Order of diffraction for principal maxima\n", +"// As (a+b)*sin(theta1) = n*lambda, solving for theta1\n", +"theta1 = asind(n*lambda1/(a_plus_b)); // Angle of diffraction for the principal maxima of D1 line, degrees\n", +"theta2 = asind(n*lambda2/(a_plus_b)); // Angle of diffraction for the principal maxima of D2 line, degrees\n", +"printf('\nThe angle of diffraction for the principal maxima of D1 line = %5.2f degrees', theta1);\n", +"printf('\nThe angle of diffraction for the principal maxima of D2 line = %5.2f degrees', theta2);\n", +"\n", +"// Result \n", +"// The angle of diffraction for the principal maxima of D1 line = 20.70 degrees\n", +"// The angle of diffraction for the principal maxima of D2 line = 20.72 degrees " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.23: Highest_order_spectrum_which_can_be_seen_in_monochromatic_light.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.23:: Page-3.45 (2009)\n", +"clc; clear;\n", +"lambda = 5500e-008; // Wavelength of light used, cm\n", +"N = 15000; // No. of lines per inch of grating, lines/inch\n", +"a_plus_b = 2.54/N; // Grating element, cm\n", +"n = 1; // Order of diffraction for principal maxima\n", +"// As (a+b)*sin(theta_n) = n*lambda and for maximum possible order of spectra sin(theta_n) = 1\n", +"// So (a+b) = n*lambda, solving for n\n", +"n = (a_plus_b)/lambda; // The highest order spectrum which can be seen in monochromatic light\n", +"\n", +"printf('\nThe highest order spectrum which can be seen in monochromatic light = %d', n);\n", +"\n", +"// Result \n", +"// The highest order spectrum which can be seen in monochromatic light = 3 " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.24: Angle_of_separation_in_second_order_of_diffraction_spectrum.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.24: : Page-3.46 (2009)\n", +"clc; clear;\n", +"lambda1 = 5890e-008; // Wavelength of D1 line, cm\n", +"lambda2 = 5896e-008; // Wavelength of D2 line, cm\n", +"N = 15000; // No. of lines per inch of grating, lines/inch\n", +"a_plus_b = 2.54/N; // Grating element, cm\n", +"n = 2; // Order of diffraction for secondary maxima\n", +"// As (a+b)*sin(theta_n) = n*lambda, solving for theta1 and theta2\n", +"theta1 = asind(n*lambda1/a_plus_b); // Direction of secondary maxima with lambda1, degrees\n", +"theta2 = asind(n*lambda2/a_plus_b); // Direction of secondary maxima with lambda2, degrees\n", +"\n", +"printf('\nThe angle of separation in second order diffraction spectrum = %3.1f degrees', theta2-theta1);\n", +"\n", +"// Result \n", +"// The angle of separation in second order diffraction spectrum = 0.1 degrees " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.25: Separation_of_two_lines_in_first_order_spectrum.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.25:: Page-3.46 (2009)\n", +"clc; clear;\n", +"lambda1 = 5500e-008; // First wavelength, cm\n", +"lambda2 = 3700e-008; // Second wavelength, cm\n", +"N = 15000; // No. of lines per inch of grating, lines/inch\n", +"a_plus_b = 2.54/N; // Grating element, cm\n", +"f = 120; // Focal length of the lens, cm\n", +"n = 1; // Order of diffraction for principal maxima\n", +"// As (a+b)*sin(theta_n) = n*lambda, solving for theta1 and theta2\n", +"theta1 = asind(n*lambda1/a_plus_b); // Direction of principal maxima with lambda1, degrees\n", +"theta2 = asind(n*lambda2/a_plus_b); // Direction of principal maxima with lambda2, degrees\n", +"// As tand(theta) = x/f, solving for x1 - x2 = dx\n", +"dx = f*(tand(theta1)-tand(theta2)); // Linear separation of two lines in first order spectrum, cm\n", +"\n", +"printf('\nThe linear separation of two lines in first order spectrum = %5.2f cm', dx);\n", +"\n", +"// Result \n", +"// The linear separation of two lines in first order spectrum = 14.34 cm " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.26: Difference_in_the_deviation_in_the_first_and_third_order_spectra.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.26:: Page-3.47 (2009)\n", +"clc; clear;\n", +"lambda = 5000e-008; // Wavelength of light used, cm\n", +"N = 5000; // No. of lines per cm of grating, lines/cm\n", +"a_plus_b = 1/N; // Grating element, cm\n", +"n = 1; // Order of diffraction for first order spectra\n", +"// As (a+b)*sin(theta_n) = n*lambda, solving for theta for first and third orders\n", +"theta1 = asind(n*lambda/a_plus_b); // Direction of principal maxima with lambda1, degrees\n", +"n = 3; // Order of diffraction for third order spectra\n", +"theta3 = asind(n*lambda/a_plus_b); // Direction of principal maxima with lambda2, degrees\n", +"delta_theta = theta3 - theta1; // Angular separation in the first and third order spectra, \n", +"\n", +"printf('\nThe difference in the deviation in the first and third order spectra = %4.1f degrees', delta_theta);\n", +"\n", +"// Result \n", +"// The difference in the deviation in the first and third order spectra = 34.1 degrees " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.27: Order_of_diffraction_for_the_given_grating_element_and_wavelength_of_light.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.27:: Page-3.48 (2009)\n", +"clc; clear;\n", +"lambda = 6500e-008; // Wavelength of light used, cm\n", +"N = 10000; // No. of lines per cm of grating, lines/cm\n", +"a_plus_b = 1/N; // Grating element, cm\n", +"theta_n = 90; // Direction for maximum possible orders, degrees\n", +"// As (a+b)*sin(theta_n) = n*lambda, solving for theta for n\n", +"n = a_plus_b*sind(theta_n)/lambda; // Order of diffraction for \n", +"\n", +"printf('\nThe order of diffraction for the given grating element and wavelength of light = %d', n);\n", +"\n", +"// Result \n", +"// The order of diffraction for the given grating element and wavelength of light = 1 " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.28: Number_of_lines_ruled_on_the_grating_surface.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.28:: Page-3.48 (2009)\n", +"clc; clear;\n", +"lambda1 = 6500e-008; // Wavelength of first line, cm\n", +"lambda2 = 4500e-008; // Wavelength of scecond line, cm\n", +"theta1 = 18; // Direction of lower order, degrees\n", +"theta2 = 18; // Direction of higher order, degrees\n", +"// As (a+b)*sin(theta1) = n*lambda1 and (a+b)*sin(theta2) = (n+1)*lambda2, solving for n\n", +"n = lambda2/(lambda1 - lambda2); // Order of diffraction for first wavelength\n", +"// As a_plus_b = n*lambda1/sind(theta1), solving for a_plus_b\n", +"a_plus_b = ceil(n)*lambda1/sind(theta1); // Grating element, cm\n", +"N = 1/a_plus_b; // No. of lines on the grating surface, lines/cm\n", +"\n", +"printf('\nThe number of lines ruled on the grating surface = %4d lines/cm', N);\n", +"\n", +"// Result \n", +"// The number of lines ruled on the grating surface = 1584 lines/cm " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.29: Angles_at_which_first_and_second_order_maxima_are_observed.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.29:: Page-3.48 (2009)\n", +"clc; clear;\n", +"lambda = 6328e-008; // Wavelength of He-Laser, cm\n", +"a_plus_b = 1/6000; // Grating element, cm\n", +"n = 1; // First order of diffraction for given wavelength\n", +"// As (a+b)*sin(theta1) = n*lambda, solving for theta1\n", +"theta1 = asind(n*lambda/a_plus_b); // Angle at which first order maximum is observed, degrees\n", +"n = 2; // second order of diffraction for given wavelength\n", +"theta2 = asind(n*lambda/a_plus_b); // Angle at which second order maximum is observed, degrees\n", +"\n", +"printf('\nThe angle at which first order maximum is observed = %4.1f degrees', theta1);\n", +"printf('\nThe angle at which second order maximum is observed = %4.1f degrees', theta2);\n", +"\n", +"// Result \n", +"// The angle at which first order maximum is observed = 22.3 degrees\n", +"// The angle at which second order maximum is observed = 49.4 degrees " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2: Zone_plate_with_a_point_source_of_light_on_the_axis.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.2:: Page-3.9 (2009)\n", +"clc; clear;\n", +"v1 = 36; // Position of the strongest image from the zone plate, cm\n", +"v2 = 9; // Position of the next image from the zone plate, cm\n", +"lambda = 5890e-008; // Wavelength of light used, cm\n", +"r1 = 1; // For simplicity assume radius of first ring of zone plate to be unity, cm\n", +"n = 1; // Order of zone plate\n", +"// As 1/v1-1/u = n*lambda/r1^2 = 1/3*(1/v2-1/u), solving for u\n", +"u = 2/(3/36-1/9); // Distance of the zone plate from source, cm\n", +"// As 1/v-1/u = n*lambda/r1^2, solving for r1\n", +"r1 = sqrt(lambda/(1/v1-1/abs(u))); // Radius of first zone, cm\n", +"f1 = r1^2/(n*lambda); // Principal focal length, cm\n", +"\n", +"printf('\nThe distance of the zone plate from source = %2d cm', u);\n", +"printf('\nThe radius of first zone = %3.1e cm', r1);\n", +"printf('\nThe principal focal length = %4.1f cm', f1);\n", +"\n", +"// Result \n", +"// The distance of the zone plate from source = -72 cm\n", +"// The radius of first zone = 6.5e-002 cm\n", +"// The principal focal length = 72.0 cm " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.30: Least_width_of_plane_transmission_grating.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.30:: Page-3.49 (2009)\n", +"clc; clear;\n", +"lambda1 = 5890e-008; // Wavelength of D1 line of Na, cm\n", +"lambda2 = 5896e-008; // Wavelength of D2 line of Na, cm\n", +"d_lambda = lambda2-lambda1; // Linear separation of two lines just seen as separate, cm\n", +"P = 500; // Number of lines per cm on grating, lines/cm\n", +"n = 2; // Order of diffraction\n", +"// As resolving power of grating, lambda/d_lambda = n*N, solving for N\n", +"N = lambda1/(d_lambda*n); // No. of lines required per cm on grating, lines/cm\n", +"w = N/P; // Least width of grating, cm\n", +"\n", +"printf('\nThe least width of plane transmission grating = %5.3f cm', w);\n", +"\n", +"// Result \n", +"// The least width of plane transmission grating = 0.982 cm " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.31: Minimum_grating_width_required_to_resolve_two_wavelengths.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.31:: Page-3.49 (2009)\n", +"clc; clear;\n", +"theta1 = 18; // Direction at which first spectral line appears, degrees\n", +"theta2 = 18+5/(60*60); // Direction at which second spectral line appears, degrees\n", +"d_theta = (theta2-theta1)*%pi/180; // Angular separation of two spectral lines, radians\n", +"d_lambda = 50e-010; // Linear separation of two spectral lines just seen as separate, cm\n", +"DP = d_theta/d_lambda; // Dispersive power of grating\n", +"n = 1; // Order of diffraction\n", +"// As dispersive power of grating d_theta/d_lambda = DP = n/((a_plus_b)*cosd(theta1)), solving for a_plus_b\n", +"a_plus_b = n/(DP*cosd(theta1)); // Grating element, cm\n", +"// But a_plus_b*sind(theta1)=n*lambda1, solving for lambda1\n", +"lambda1 = a_plus_b*sind(theta1)/n; // Wavelength of first spectral line, cm\n", +"lambda2 = lambda1+d_lambda/1e-002; // Wavelength of second spectral line, cm\n", +"// As resolving power of grating, lambda/d_lambda = n*N, solving for N\n", +"N = lambda1/(d_lambda*n); // No. of lines required per cm on grating\n", +"w = N*a_plus_b; // Minimum grating width required to resolve two wavelengths, cm\n", +"\n", +"printf('\nThe wavelength of first spectral line = %4.0f angstrom', lambda1/1e-008);\n", +"printf('\nThe wavelength of second spectral line = %4.0f angstrom', lambda2/1e-008);\n", +"printf('\nThe minimum grating width required to resolve two wavelengths = %3.1f cm', w);\n", +"\n", +"// Result \n", +"// The wavelength of first spectral line = 6702 angstrom\n", +"// The wavelength of second spectral line = 6752 angstrom\n", +"// The minimum grating width required to resolve two wavelengths = 2.9 cm " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.32: Angle_of_diffraction_for_maxima_in_first_order.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.32:: Page-3.50 (2009)\n", +"clc; clear;\n", +"// Function to convert theta into degree-minute\n", +"function[degre, minute]=deg_2_degminsec(theta)\n", +" degre = floor(theta);\n", +" minute = (theta-floor(theta))*60;\n", +"endfunction\n", +"\n", +"N = 15000; // No. of lines on the grating per inch, lines/inch\n", +"a_plus_b = 2.54/N; // Grating element, cm\n", +"lambda = 6000e-008; // Wavelength of light used, cm\n", +"n = 1; // Order of diffraction spectra\n", +"// But a_plus_b*sind(theta)=n*lambda, solving for theta\n", +"theta = asind(n*lambda/a_plus_b); // Direction in which first order spectra is seen, degrees\n", +"[deg, mint] = deg_2_degminsec(theta);\n", +"printf('\nThe angle of diffraction for maxima in first order = %2d degrees %2d min', deg, mint);\n", +"\n", +"// Result \n", +"// The angle of diffraction for maxima in first order = 20 degrees 45 min " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.33: Wavelength_of_light_used_in_obtaining_second_order_diffraction_maximum.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.33:: Page-3.50 (2009)\n", +"clc; clear;\n", +"N = 12000; // No. of lines on the grating per inch, lines/inch\n", +"a_plus_b = 2.54/N; // Grating element, cm\n", +"n = 2; // Order of diffraction spectra\n", +"theta = 39; // Angle of diffraction for maxima in second order, degrees\n", +"// But a_plus_b*sind(theta)=n*lambda, solving for lambda\n", +"lambda = a_plus_b*sind(theta)/n; // Wavelength of light used, cm\n", +"\n", +"printf('\nThe wavelength of light used in obtaining second order diffraction maximum = %4d angstrom', lambda/1e-008);\n", +"\n", +"// Result \n", +"// The wavelength of light used in obtaining second order diffraction maximum = 6660 angstrom " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.34: Number_of_visible_orders_using_diffraction_grating.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.34:: Page-3.51 (2009)\n", +"clc; clear;\n", +"lambda = 5890e-008; // Wavelength of light used, cm\n", +"N = 6000; // No. of lines on the grating per inch, lines/inch\n", +"a_plus_b = 2.54/N; // Grating element, cm\n", +"theta_max = 90; // Direction of maxima for maximum possible orders\n", +"// But a_plus_b*sind(theta_max)=n*lambda, solving for n\n", +"n = a_plus_b*sind(theta_max)/lambda; // Number of visible orders\n", +"\n", +"printf('\nThe number of visible orders using diffraction grating = %d', n);\n", +"\n", +"// Result \n", +"// The number of visible orders using diffraction grating = 7 " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.35: Distance_between_two_wavelengths_seen_as_separate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.35:: Page-3.51 (2009)\n", +"clc; clear;\n", +"lambda = 5500e-008; // Mean of two wavelengths, cm\n", +"theta = 35; // Angle of diffraction for maxima in second order\n", +"d_theta = 0.15; // Angular separation between two neighbouring wavelengths, radians\n", +"d_lambda = lambda*cotd(theta)*d_theta; // Distance between two wavelengths seen as separate, cm\n", +"\n", +"printf('\nThe distance between two wavelengths seen as separate = %d angstrom', d_lambda/1e-008);\n", +"\n", +"// Result \n", +"// The distance between two wavelengths seen as separate = 1178 angstrom " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.36: Number_of_lines_per_cm_on_grating_surface.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.36:: Page-3.51 (2009)\n", +"clc; clear;\n", +"lambda1 = 5500e-008; // First wavelength of light, cm\n", +"lambda2 = 4500e-008; // Second wavelength of light, cm\n", +"theta = 45; // Angle of diffraction for lower order, degrees\n", +"n = lambda2/(lambda1-lambda2); // Lower order of diffraction\n", +"// But a_plus_b*sind(theta)=n*lambda, solving for a_plus_b\n", +"a_plus_b = floor(n)*lambda1/sind(theta); // Grating element, cm\n", +"N = 1/a_plus_b; // No. of lines per cm on grating surface, lines/cm\n", +"\n", +"printf('\nThe number of lines per cm on grating surface = %4d lines/cm', ceil(N));\n", +"\n", +"// Result \n", +"// The number of lines per cm on grating surface = 3215 lines/cm " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.37: Total_number_of_lines_on_grating_surface.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.37:: Page-3.52 (2009)\n", +"clc; clear;\n", +"lambda = 6500e-008; // Wavelength of light used, cm\n", +"theta = 19.5; // Angle of diffraction for maxima in first order, degrees\n", +"l = 3.5; // Length of the grating, cm\n", +"n = 1; // Order of diffraction\n", +"// But a_plus_b*sind(theta)=n*lambda, solving for a_plus_b\n", +"a_plus_b = n*lambda/sind(theta); // Grating element, cm\n", +"N = 1/a_plus_b; // No. of lines per cm on grating surface, lines/cm\n", +"N_total = l*N; // Total number of lines on grating surface\n", +"\n", +"printf('\nThe total number of lines on grating surface = %5d', N_total);\n", +"\n", +"// Result \n", +"// The total number of lines on grating surface = 17974 " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.38: Angular_separation_between_the_sodium_D1_and_D2_lines.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code EX3.38:: Page-3.52 (2009)\n", +"clc;clear;\n", +"function [mint, secnd]=degmin(theta)\n", +" mint = (theta-floor(theta))*60;\n", +" secnd = (mint-floor(mint))*60\n", +"endfunction\n", +"lambda_D1 = 5890e-008; // Wavelength of sodium D1 line, cm\n", +"lambda_D2 = 5896e-008; // Wavelength of sodium D2 line, cm\n", +"n = 2; // Order of diffraction\n", +"N = 6500; // Number of lines per cm on grating, lines/cm\n", +"a_plus_b = 1/6500; // Grating element, cm\n", +"// As a_plus_b*sin(theta1)=n*lambda1, solving for theta1\n", +"theta1 = asind(n*lambda_D1/a_plus_b);\n", +"// As a_plus_b*sin(theta2)=n*lambda2, solving for theta1\n", +"theta2 = asind(n*lambda_D2/a_plus_b);\n", +"d_theta = theta2-theta1; // Angular separation between the sodium D1 and D2 lines, degrees\n", +"[mint, secnd] = degmin(d_theta); // Call deg_2_degmin function\n", +"printf('\nThe angular separation between the sodium D1 and D2 lines = %d minutes %d seconds', mint, secnd);\n", +"// Result\n", +"// The angular separation between the sodium D1 and D2 lines = 4 minutes 10 seconds \n", +"// Since theta1 and theta2 are rounded off in the textbook, therefore the answer is mismatching." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.39: Minimum_number_of_lines_in_a_grating.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code EX3.39:: Page-3.55 (2009)\n", +"clc;clear;\n", +"lambda1 = 5890e-008; // Wavelength of sodium D1 line, cm\n", +"lambda2 = 5896e-008; // Wavelength of sodium D2 line, cm\n", +"d_lambda = lambda2-lambda1; // Difference in the wavelength of two lines, cm\n", +"n = 2; // Order of diffraction\n", +"// As lambda/d_lambda = n*N, solving for N\n", +"N = lambda1/(d_lambda*n); // Minimum number of lines in a grating\n", +"printf('\nThe minimum number of lines in a grating = %3d lines', N);\n", +"// Result\n", +"// The minimum number of lines in a grating = 490 lines " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3: Position_of_the_first_image_in_a_zone_plate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.3:: Page-3.10 (2009)\n", +"clc; clear;\n", +"lambda = 5500e-010; // Wavelength of light used, cm\n", +"u = -4; // Distance of the zone plate from source, cm\n", +"D = 3.7e-003; // Diameter of central zone of zone plate, cm\n", +"r = D/2; // Radius of central zone of zone plate, cm\n", +"n = 1; // Order of zone plate\n", +"f1 = r^2/(n*lambda); // Principal focal length, cm\n", +"v1 = 36; // Position of the strongest image from the zone plate, cm\n", +"v2 = 9; // Position of the next image from the zone plate, cm\n", +"// As 1/v - 1/u = 1/f, solving for v\n", +"v = 1/(1/f1+1/u); // Position of the first image in a zone plate, cm\n", +"\n", +"printf('\nThe position of the first image in a zone plate = %2d cm', floor(v));\n", +"\n", +"// Result \n", +"// The position of the first image in a zone plate = -12 cm " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.40: Linear_separation_of_two_points_on_the_moon.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code EX3.40:: Page-3.56 (2009)\n", +"clc;clear;\n", +"lambda = 5500e-008; // Wavelength of most sensitive color to an eye, cm\n", +"a = 400; // Aperture of the telescope, cm\n", +"D = 3.8e+010; // Distance of the moon from the earth, cm\n", +"d_theta = 1.22*lambda/a; // Limit of resolution of telescope, radians\n", +"// As d_theta = x/D, solving for x\n", +"x = d_theta*D; // Linear separation of two points on the moon, cm\n", +"printf('\nThe linear separation of two points on the moon = %5.2f m', x/1e+002);\n", +"// Result\n", +"// The linear separation of two points on the moon = 63.74 m " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.41: Minimum_required_number_of_lines_on_the_plane_transmission_grating.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code EX3.41:: Page-3.56 (2009)\n", +"clc;clear;\n", +"lambda1 = 5890e-008; // Wavelength of sodium D1 line, cm\n", +"lambda2 = 5896e-008; // Wavelength of sodium D2 line, cm\n", +"d_lambda = lambda2-lambda1; // Wavelength difference, cm\n", +"n = 2; // Order of diffraction\n", +"// As lambda/d_lambda = n*N, solving for N\n", +"N = 1/n*(lambda1+lambda2)/(2*d_lambda); // Minimum required number of lines on the plane transmission grating\n", +"printf('\nThe minimum required number of lines on the plane transmission grating = %3d', N);\n", +"// Result\n", +"// The minimum required number of lines on the plane transmission grating = 491 " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.42: EX3_42.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code EX3.42:: Page-3.57 (2009)\n", +"clc;clear;\n", +"lambda1 = 5890e-008; // Wavelength of sodium D1 line, cm\n", +"lambda2 = 5896e-008; // Wavelength of sodium D2 line, cm\n", +"d_lambda = lambda2-lambda1; // Wavelength difference, cm\n", +"w = 2.5; // Width of the grating, cm\n", +"n = 2; // Order of diffraction\n", +"// As lambda/d_lambda = n*N, solving for N\n", +"N = 1/n*(lambda1+lambda2)/(2*d_lambda); // Minimum required number of lines on the plane transmission grating\n", +"printf('\nThe number of lines on the plane transmission grating to just resolve the sodium lines = %3d', N/w);\n", +"// Result\n", +"// The number of lines on the plane transmission grating to just resolve the sodium lines = 196 " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.43: Minimum_width_of_the_grating_to_resolve_the_sodium_lines_in_third_order.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code EX3.43:: Page-3.57 (2009)\n", +"clc;clear;\n", +"lambda1 = 5890e-008; // Wavelength of sodium D1 line, cm\n", +"lambda2 = 5896e-008; // Wavelength of sodium D2 line, cm\n", +"d_lambda = lambda2-lambda1; // Wavelength difference, cm\n", +"n = 3; // Order of diffraction\n", +"P = 2500; // Number of lines per unit length of grating\n", +"// As lambda/d_lambda = n*N, solving for N\n", +"N = 1/n*(lambda1+lambda2)/(2*d_lambda); // Total lines on the grating \n", +"w = N/P; // Minimum width of the grating, cm\n", +"printf('\nThe minimum width of the grating to resolve the sodium lines in third order = %5.3f cm', w);\n", +"// Result\n", +"// The minimum width of the grating to resolve the sodium lines in third order = 0.131 cm " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.44: Dispersive_power_and_diffraction_angle_for_grating.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code EX3.44:: Page-3.57 (2009)\n", +"clc;clear;\n", +"w = 2; // Width of the grating, cm\n", +"P = 4500; // Total number of lines on the grating\n", +"a_plus_b = w/P; // Grating element, cm\n", +"lambda1 = 5890e-008; // Wavelength of sodium D1 line, cm\n", +"lambda2 = 5896e-008; // Wavelength of sodium D2 line, cm\n", +"lambda = (lambda1+lambda2)/2; // Mean wavelength of light used, cm\n", +"d_lambda=lambda2-lambda1; // Difference in wavelengths of D-lines of sodium, cm\n", +"n = 2; // Order of diffraction\n", +"// As a_plus_b*sind(theta)=n*lambda, solving for theta\n", +"theta = asind(n*lambda/a_plus_b); // Angle of diffraction, degrees\n", +"DP = n/(a_plus_b*cosd(theta)); // Dispersive power of grating\n", +"d_theta = DP*d_lambda*180/%pi; // Angular separation between D-lines, degrees\n", +"RP = lambda/d_lambda; // Required resolving power of grating for sodium lines\n", +"N = 2.54/a_plus_b; // No. of lines per cm on grating, lines/cm\n", +"RP_cal = n*N; // Calculated resolving power of grating \n", +"printf('\nThe angle of diffraction for maxima in second order = %6.4f degrees', d_theta);\n", +"printf('\nAs %5.3e > %3d, D-lines can be resolved.', RP_cal, RP);\n", +"// Result\n", +"// The angle of diffraction for maxima in second order = 0.0160 degrees\n", +"// As 1.143e+04 > 982, D-lines can be resolved. " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.45: Distance_between_centres_of_images_of_the_two_stars.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code EX3.45:: Page-3.58 (2009)\n", +"clc;clear;\n", +"lambda = 5500e-010; // Wavelength of light used, m\n", +"a = 0.01; // Diameter of objective of telescope, m\n", +"f = 3.0; // Focal length of tlescope objective, m \n", +"// For telescope, the limit of resolution, \n", +"// theta = x/f = 1.22*lambda/a, solving for x\n", +"x = 1.22*lambda/a*f; // Distance between centres of imgaes of the two stars\n", +"printf('\nThe distance between centres of imgaes of the two stars = %4.2e m', x);\n", +"// Result\n", +"// The distance between centres of imgaes of the two stars = 2.01e-04 m " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.46: Aperture_of_the_objective_of_the_microscope.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code EX3.46:: Page-3.59 (2009)\n", +"clc;clear;\n", +"lambda = 5461e-008; // Wavelength of light used, cm\n", +"d = 4e-005; // Separation distance between two self-luminous objects, cm\n", +"NA = 1.22*lambda/(2*d); // Numerical aperture of microscope, cm\n", +"printf('\nThe numerical aperture of the objective of the microscopes = %6.4f cm', NA);\n", +"// Result\n", +"// The numerical aperture of the objective of the microscopes = 0.8328 cm " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4: Principal_focal_length_of_zone_plate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.4:: Page-3.11 (2009)\n", +"clc; clear;\n", +"lambda = 1; // For simplicity assume wavelength of light used to be unity, unit\n", +"R = 150; // Radius of curvature of the curved surface, cm\n", +"r1 = sqrt(lambda*R); // For Newton's ring, cm\n", +"f1 = r1^2/lambda; // Principal focal length of zone plate, cm\n", +"\n", +"printf('\nThe principal focal length of zone plate = %3d cm', f1);\n", +"\n", +"// Result \n", +"// The principal focal length of zone plate = 150 cm " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.5: Half_angular_width_at_central_maximum_in_Fraunhoffer_diffraction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.5:: Page-3.22 (2009)\n", +"clc; clear;\n", +"lambda = 5000e-008; // Wavelength of light used, cm\n", +"a = 15e-005; // Width of the slit, cm\n", +"n = 1; // Order of diffraction\n", +"// For a single slit Fraunhofer diffraction, a*sin(theta) = n*lambda, solving for theta\n", +"theta = asin(n*lambda/a); // Half angular width at central maximum in Fraunhoffer diffraction, radian\n", +"\n", +"printf('\nThe half angular width at central maximum in Fraunhoffer diffraction = %5.3f rad', theta);\n", +"\n", +"// Result \n", +"// The half angular width at central maximum in Fraunhoffer diffraction= 0.340 rad " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.6: Width_of_the_slit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.6:: Page-3.23 (2009)\n", +"clc; clear;\n", +"lambda = 5000e-010; // Wavelength of light used, cm\n", +"n = 1; // Order of diffraction\n", +"x = 5e-003; // Position of first minima on either sides of central maximum, m\n", +"D = 2.5; // Distance of screen from the narrow slir, m\n", +"sin_theta = x/sqrt(x^2+D^2); // Sine of angle theta, rad\n", +"// For a single slit Fraunhofer diffraction, a*sin(theta) = n*lambda, solving for a\n", +"a = n*lambda/sin_theta; // Width of the slit, m\n", +"\n", +"printf('\nThe Width of the slit = %3.1e m', a);\n", +"\n", +"// Result \n", +"// The Width of the slit = 2.5e-004 m " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.7: Angular_width_of_central_maximum.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.7:: Page-3.23 (2009)\n", +"clc; clear;\n", +"lambda = 6000e-010; // Wavelength of light used, m\n", +"a = 15e-007; // Width of the slit, m\n", +"// For a single slit Fraunhofer diffraction, a*sind(theta) = n*lambda, solving for theta\n", +"theta = asind(lambda/a); // Half angular width of central maximum, degrees\n", +"\n", +"printf('\nThe angular width of central maximum = %2d degrees', 2*ceil(theta));\n", +"\n", +"// Result \n", +"// The angular width of central maximum = 48 degrees " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.8: Distance_between_first_minima_and_the_next_minima_from_the_axis.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.8:: Page-3.23 (2009)\n", +"clc; clear;\n", +"lambda = 5000e-010; // Wavelength of light used, m\n", +"a = 0.7e-002; // Width of the slit, m\n", +"f = 0.5; // Focal length of the lens, m\n", +"n = 1; // Order of diffraction\n", +"// For minima, a*sind(theta_n) = n*lambda\n", +"// Also theta_n = n*lambda/a = x1/f, solving for x1\n", +"x1 = f*n*lambda/a; // Position of first minima, cm\n", +"// For secondary maxima, a*sind(theta_n) = (2*n+1)*lambda/2\n", +"// Also theta_n = 3*lambda/(2*a) = x2/f, solving for x2\n", +"n = 1; // Order of diffraction for first secondary minima\n", +"x2 = 3*f*lambda/(2*a); // Position of first secondary maxima, cm\n", +"\n", +"printf('\nThe distance between first minima and the next minima from the axis = %4.2e cm', x2-x1);\n", +"\n", +"// Result \n", +"// The distance between first minima and the next minima from the axis = 1.79e-005 cm " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.9: Width_of_central_maxima_in_diffraction_pattern.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab Code Ex3.9:: Page-3.24 (2009)\n", +"clc; clear;\n", +"lambda = 6600e-008; // Wavelength of light used, cm\n", +"a = 0.018; // Width of the slit, cm\n", +"f = 200; // Focal length of the lens, cm\n", +"n = 1; // Order for first order diffraction\n", +"// As a*sin(theta) = n*lambda, a*theta = n*lambda\n", +"// As theta = lambda/a and theta = x/f, solving for x\n", +"x = lambda*f/a; // Half angular width at central maximum, cm\n", +"\n", +"printf('\nThe width of central maximum = %3.1f cm', 2*x);\n", +"\n", +"// Result \n", +"// The width of central maximum = 1.5 cm " + ] + } +], +"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 +} |