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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 10: Physical Optics"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 10.1: plancks_theory.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clc\n",
"clear\n",
"//input\n",
"h=6.6*10^-34 //plancks constant\n",
"c=3*10^8 //velocity of light\n",
"e1=12.34//excited state\n",
"e2=14.19//ground state\n",
"//calculation\n",
"l=(h*c)/((e2-e1)*1.6*10^-19)//conservation of energy and plancks theory\n",
"//output\n",
"printf('the wavelength is %3.3e m',l)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 10.2: wavelength_and_prism_angle.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clc\n",
"clear\n",
"//input\n",
"la=0.535*10^-6//wavelength\n",
"nb=1.51//refractive index\n",
"dmin=34 //minimum deviation\n",
"//calculation\n",
"l=la/nb//wavelength of light\n",
"x=(nb-cosd(dmin/2))/sind(dmin/2)//refractive index of prism\n",
"y=acotd(x)\n",
"z=y*2\n",
"//output\n",
"printf('the wavelength of light is %3.3e m',l)\n",
"printf('\nthe angle of prism is %3.0d deg',z)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 10.3: thin_film_interference.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clc\n",
"clear\n",
"//input\n",
"n=7//order of fringe\n",
"l=0.63*10^-6 //wavelength\n",
"x=24.8*10^-3 //seperation of bands\n",
"d=1.5\n",
"//calculation\n",
"a=n*d*l/x//slit seperation\n",
"//output\n",
"printf('the slit seperation is %3.3e m',a)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 10.4: fringe_width_determination.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clc\n",
"clear\n",
"//input\n",
"n=6//order of fringe\n",
"l=0.63*10^-6 //wavelength\n",
"x=24.8*10^-3 //seperation of bands\n",
"d=1.5\n",
"a=2.7*10^-4\n",
"//calculation\n",
"x=d*(6+1/2)*l/a//distance between centre and sixth fringe\n",
"w=l*1.6/a//fringe width\n",
"//output\n",
"printf('the distance between centre and sixth fringe is %3.3e m',x)\n",
"printf('\nthe fringe width is %3.3e m',w)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 10.5: increasing_thickness_effect.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clc\n",
"clear\n",
"//input\n",
"a=4//widge dimension\n",
"b=64//edge of tissue\n",
"c=33//bright fringes\n",
"l=0.53*10^-6 //wavelength\n",
"//calculation\n",
"m=b*c/a//number of bright fringes\n",
"t=m*l/2//thickness\n",
"//output\n",
"printf('the thickness is %3.3e m and hence number of fringes also increases',t)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 10.6: wavelength_and_angular_displacement.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clc\n",
"clear\n",
"//input\n",
"n1=6//6th order image\n",
"n2=5//5th order image\n",
"n=3000//lines per cm\n",
"//calculation\n",
"l=n2*0.11*10^-6/(6-5)//applying dsinx=nl\n",
"l1=l+(0.11*10^-6)//applying dsinx=nl\n",
"d=1/(n*100)//applying dsinx=nl ,grating space calculation\n",
"x=n1*l/d \n",
"y=asind(x)\n",
"//output\n",
"printf('the wavenlength of first wave is %3.3e m',l)\n",
"printf('\nthe wavenlength of second wave is %3.3e m',l1)\n",
"printf('\n the angular displacement is %3.3f deg',y)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 10.7: wavelength_and_diffraction_angle.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clc\n",
"clear\n",
"//input\n",
"n2=1.36//refractive index\n",
"N=5000*100 //number of lines per m\n",
"t=23 //angle of diffraction\n",
"//calculation\n",
"l=sind(t)/(n2*N)//applying dsinx=nl,calculating wavelength \n",
"x=N*l//angle of diffraction\n",
"y=asind(x)\n",
"//output\n",
"printf('the wavelength of light in methanol is %3.3e m',l)\n",
"printf('\n the angle of diffraction is %3.3f degrees',y)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 10.8: telescope_angular_magnification.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clc\n",
"clear\n",
"//input\n",
"fo=1.5//objective's focal length\n",
"fc=0.04//eyepiece focal length\n",
"//calculation\n",
"m=fo/fc//angular magnification\n",
"v=fc*(fc+fo)/fo//distance of eye ring from eyepiece\n",
"//output\n",
"printf('the angular magnification is %3.2f',m)\n",
"printf('\n the distance of eye ring from eyepiece is %3.3f m',v)"
]
}
],
"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
}
|