1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 37: Diffraction"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 37.1: Sample_Problem_1.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"exec('degree_rad.sci', -1)\n",
"\n",
"//Given that\n",
"lambda = 650*10^-9 //in meter\n",
"theta = dtor(15) //in radians\n",
"\n",
"//Sample Problem 37-1a\n",
"printf('**Sample Problem 37-1a**\n')\n",
"//We know that [a*sin(theta) = m*lambda] for m=Integer\n",
"m = 1\n",
"a = m*lambda/sin(theta)\n",
"printf('The slit width is equal to %fnm\n', a*10^9)\n",
"\n",
"//Sample Problem 37-1b\n",
"printf('\n**Sample Problem 37-1b**\n')\n",
"m = 3/2 //for first side maxima\n",
"lambdaDESH = a*sin(theta)/ m\n",
"printf('The wavelength of the light is equal to %fnm', lambdaDESH*10^9)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 37.2: Sample_Problem_2.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Sample Problem 37-2\n",
"printf('**Sample Problem 37-2**\n')\n",
"I = [];\n",
"for m = 1:3\n",
" theta = (m+.5)*%pi\n",
" I = [I, (sin(theta)/theta)^2]\n",
"end\n",
"printf('The intensities of secondary maximas relative to intensity of CBF is-\n')\n",
"printf('\tI1/Im = %.4f\n', I(1))\n",
"printf('\tI2/Im = %.4f\n', I(2))\n",
"printf('\tI3/Im = %.4f', I(3))"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 37.3: Sample_Problem_3.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Given that\n",
"d = 32*10^-3 //in meter\n",
"f= 24*10^-2 //in meter\n",
"lam = 550*10^-9 //in meter\n",
"\n",
"//Sample Problem 37-3a\n",
"printf('**Sample Problem 37-3a**\n')\n",
"theta = 1.22*lam/d\n",
"printf('Angular sepration should be equal to %erad\n', theta)\n",
"\n",
"//Sample Problem 37-3b\n",
"printf('\n**Sample Problem 37-3b**\n')\n",
"deltaX = f*theta\n",
"printf('The sepration between the two images is %em', deltaX)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 37.4: Sample_Problem_4.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Given that\n",
"l = 405*10^-9 //in meter\n",
"d = 19.44*10^-6 //in meter\n",
"a = 4.050*10^-6 //in meter\n",
"\n",
"//Sample Problem 37-4a\n",
"printf('**Sample Problem 37-4a**\n')\n",
"n = floor(d/a)\n",
"printf('The number of bright fringes are %d\n', 2*n+1)\n",
"\n",
"//Sample Problem 37-4b\n",
"printf('\n**Sample Problem 37-4b**\n')\n",
"num = ceil(2*d/a)\n",
"printf('The number of bright fringes within either of the first side peak is %d', num/2 - 1)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 37.5: Sample_Problem_5.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"exec('degree_rad.sci', -1)\n",
"\n",
"//Given that\n",
"N = 1.26*10^4\n",
"w = 25.4*10^-3 //in meter\n",
"l1 = 589*10^-9 //in meter\n",
"l2 = 589.59*10^-9 //in meter\n",
"\n",
"//Sample Problem 37-5a\n",
"printf('**Sample Problem 37-5a**\n')\n",
"d = w/N\n",
"m = 1\n",
"theta = asin(m*l1/d)\n",
"theta = rtod(theta)\n",
"printf('The first order maxima occurs at an angle of %fdegree from the center\n', theta)\n",
"\n",
"//Sample Problem 37-5b\n",
"printf('\n**Sample Problem 37-5b**\n')\n",
"theta = rtod(theta)\n",
"D = m/(d*cos(theta))\n",
"deltaL = l2-l1\n",
"deltaTHETA = D*deltaL\n",
"printf('The anglar sepration between the two first orderlines is %erad\n', deltaTHETA)\n",
"\n",
"//Sample Problem 37-5c\n",
"printf('\n**Sample Problem 37-5c**\n')\n",
"Lavg = (l1+l2)/2\n",
"R = Lavg/(m*deltaL)\n",
"N = R/m\n",
"printf('The least number of rulings a grating can have is %d', N)"
]
}
],
"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
}
|