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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 22:The properties of Light"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex22.1:pg-1067"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The position of the image is i= 6.0 cm\n",
"The Size of the image is I= 0.0 cm High\n"
]
}
],
"source": [
" #Example 22_1\n",
" \n",
" \n",
"#To find the position and size of the image\n",
"d1=5 #units in cm\n",
"d2=30 #units in cm\n",
"i=(d1*d2)/(d2-d1) #Units in cm\n",
"d3=2 #units in cm\n",
"I=(i/d2)*d3 #units in cm\n",
"print \"The position of the image is i=\",round(i),\" cm\\nThe Size of the image is I=\",round(I,2),\" cm High\" \n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex22.2:pg-1068"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The position of the image is i= -10.0 cm\n"
]
}
],
"source": [
" #Example 22_2\n",
" \n",
" \n",
"#To find the location of the image\n",
"d1=10 #units in cm\n",
"d2=5 #units in cm\n",
"i=(d1*d2)/(d2-d1) #Units in cm\n",
"print \"The position of the image is i=\",round(i),\" cm\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex22.3:pg-1069"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The location of the image is i= -30.0 cm\n",
" The relative size of the image is I_O= 0.4 cm\n"
]
}
],
"source": [
" #Example 22_3\n",
" \n",
" \n",
"#To find the location of the image and its relative size\n",
"r=100.0 #Unts in cm\n",
"d1=-r/2 #units in cm\n",
"d2=75.0 #units in cm\n",
"i=(d1*d2)/(d2-d1) #Units in cm\n",
"p=75 #units in cm\n",
"sizee=-i/p #units in cm\n",
"print \"The location of the image is i=\",round(i),\" cm\\n The relative size of the image is I_O=\",round(sizee,2),\" cm\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex22.4:pg-1069"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The angle at which the light emerges in air is theta= 53.0 degrees\n"
]
}
],
"source": [
"#Example 22_4\n",
" \n",
"import math \n",
"#To find the angle at which the light emerge in to the air\n",
"theta=37 #Units in degrees\n",
"n1=1.33 #Units in constant\n",
"n2=1 #Units in constant\n",
"thetaa=math.asin((n1*math.sin(theta*math.pi/180))/n2)*180/math.pi #units in degrees\n",
"print \"The angle at which the light emerges in air is theta=\",round(thetaa),\" degrees\" \n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex22.5:pg-1068"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"We have Theta1=Theta4 \n",
"Which shows that A unform layer of transparent material does not change the direction of the beam of light\n"
]
}
],
"source": [
" #Example 22_5\n",
" \n",
" \n",
"#At what angle does the light emerges from the bottom of the dish\n",
"print \"We have Theta1=Theta4 \\nWhich shows that A unform layer of transparent material does not change the direction of the beam of light\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex22.6:pg-1068"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"From the diagram we notice that eyes will assume that the three rays come from image position indicated and as we see the image is virtual, erect and enlarged\n",
"\n",
"The image is located at i= -10.0 cm\n"
]
}
],
"source": [
" #Example 22_6\n",
" \n",
" \n",
"#To draw a ray diagram to locate the image\n",
"print \"From the diagram we notice that eyes will assume that the three rays come from image position indicated and as we see the image is virtual, erect and enlarged\"\n",
"d1=10 #units in cm\n",
"d2=5 #units in cm\n",
"i=(d1*d2)/(d2-d1) #Units in cm\n",
"print \"\\nThe image is located at i=\",round(i,2),\" cm\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex22.7:pg-1068"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"From the ray diagram we have noticed that the image is virtual, erect and dimnished in size\n",
"\n",
"The image is located at i= 3.0 cm\n"
]
}
],
"source": [
" #Example 22_7\n",
" \n",
" \n",
"#To find the image position by means of the ray diagram\n",
"print \"From the ray diagram we have noticed that the image is virtual, erect and dimnished in size\"\n",
"d1=5 #units in cm\n",
"d2=-10 #units in cm\n",
"i=(d1*d2)/(d2-d1) #Units in cm\n",
"print \"\\nThe image is located at i=\",round(i,2),\" cm\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex22.8:pg-1069"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"The image is located at i= -13.33 cm\n",
"\n",
"The Size of the image is I= 1.0 cm\n"
]
}
],
"source": [
" #Example 22_8\n",
" \n",
" \n",
"#To find the image positon and size\n",
"d1=-20 #units in cm\n",
"d2=40.0 #units in cm\n",
"i=(d1*d2)/(d2-d1) #Units in cm\n",
"print \"\\nThe image is located at i=\",round(i,2),\" cm\"\n",
"d3=3.0 #units in cm\n",
"I=(-i*d3)/d2 #units in cm\n",
"print \"\\nThe Size of the image is I=\",round(I),\" cm\"\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|