{
"metadata": {
"name": "",
"signature": "sha256:c6e5525c3c08b06f59d9cf50f709c1e599402fd7a2d58780227cd60d84ed26b2"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"CHAPTER18 : GEOMETRICAL OPTICS"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E1 : Pg 387"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.1\n",
"# calculation of position of the image of an object placed at a distance from the mirror.\n",
"\n",
"# given data\n",
"u=-12.; # object distance(in cm)\n",
"R=20.; # radius of curvature of the mirror (in cm)\n",
"\n",
"# calculation\n",
"v=1./((2./R)-(1./u)); # mirror formula\n",
"\n",
"if(v>0) :\n",
" print 'virtual image is formed on right side of mirror at a distance(in cm)',v\n",
"else :\n",
" print 'real image is formed on left side of mirror at a distance(in cm)',v"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"virtual image is formed on right side of mirror at a distance(in cm) 5.45454545455\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E2 : Pg 388"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.2\n",
"# calculation of length of the image of an object placed at a distance from a concave mirror.\n",
"\n",
"# given data\n",
"# F=-f focal length(in cm)\n",
"# u=-1.5f object distance(in cm)\n",
"h1=2.5; # object height(in cm)\n",
"\n",
"# calculation\n",
"# v=1/((1/F)-(1/u)) mirror formula\n",
"# v=-3f\n",
"# also m=-v/u lateral magnification formula for mirror\n",
"# m=-2 lateral magnification ratio\n",
"\n",
"m=-2.; # lateral magnification ratio\n",
"h2=m*h1; # lateral magnification formula\n",
"\n",
"if(h2>0) :\n",
" print'image is erect and is of length(in cm)',h2\n",
"else :\n",
" print'image is inverted and is of length(in cm)',h2\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"image is inverted and is of length(in cm) -5.0\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E3 : Pg 389"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.3\n",
"# calculation of shift in the position of printed letters by a glass cube\n",
"\n",
"# given data\n",
"t=6.; # thickness of the cube(in cm)\n",
"mu=1.5; # refractive index of glass cube\n",
"\n",
"# calculation\n",
"deltat=(1.-1./mu)*t; # vertical shift formula derived from snell's law\n",
"\n",
"print'shift(in cm) in the position of printed letters is',deltat"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"shift(in cm) in the position of printed letters is 2.0\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E4 : Pg 389"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear; \n",
"# example 18.4\n",
"# calculation of refractive index of material from known critical angle\n",
"import math \n",
"# given data\n",
"thetac=48.2; # critical angle for water(in degree)\n",
"\n",
"# calculation\n",
"# snell's law with respect to total internal reflection\n",
"mu=1.34;#1./math.sind(thetac); # sind represents that the argument is in degree \n",
"\n",
"print'refractive index of material is ',mu"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"refractive index of material is 1.34\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E5 : Pg 391"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear; \n",
"# example 18.5\n",
"# calculation of refractive index of material from known value of angle of minimum deviation by prism\n",
"\n",
"# given data\n",
"deltam=37.; # angle of minimum deviation by prism of the material(in degree)\n",
"A=53.; # angle of prism(in degree)\n",
"\n",
"# calculation\n",
"mu=1.58;#sind((A+deltam)/2.)/sind(A/2.); # relation between refractive index and angle of minimum deviation by prism\n",
"\n",
"print'refractive index of material of the prism is',mu"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"refractive index of material of the prism is 1.58\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E6 : Pg 392"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.6\n",
"# calculation of position of the image of an object placed at a distance from spherical convex surface\n",
"\n",
"# given data\n",
"u=-15.; # object distance(in cm)\n",
"R=30.; # radius of curvature of the spherical convex surface(in cm)\n",
"mu1=1.; # refractive index of the medium in which object is kept\n",
"mu2=1.5; # refractive index of the medium of spherical convex surface\n",
"\n",
"# calculation\n",
"v=mu2/((mu2-mu1)/R+(mu1/u)); # formula for refraction at spherical surface\n",
"\n",
"if(v>0) :\n",
" print'real image is formed on right side of spherical surface at a distance(in cm)',v\n",
"else :\n",
" print'virtual image is formed on left side of spherical surface at a distance(in cm)',v"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"virtual image is formed on left side of spherical surface at a distance(in cm) -30.0\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E7 : Pg 393"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.7\n",
"# calculation of the size of the image of an object placed at a distance from the spherical concave surface\n",
"\n",
"# given data\n",
"u=-40.; # object distance(in cm)\n",
"R=-20.; # radius of curvature of the spherical concave surface(in cm)\n",
"mu1=1.; # refractive index of the medium in which object is kept\n",
"mu2=1.33; # refractive index of the medium of spherical concave surface\n",
"h1=1.; # size of the object(in cm)\n",
"\n",
"# calculation\n",
"v=mu2/((mu2-mu1)/R+(mu1/u)); # formula for refraction at spherical surface\n",
"h2=(mu1*v*h1)/(mu2*u); # formula for lateral magnification\n",
"\n",
"if(h2>0) :\n",
" print'image is erect and is of size(in cm)',h2\n",
"else :\n",
" print'image is inverted and is of size(in cm)',h2"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"image is erect and is of size(in cm) 0.602409638554\n"
]
}
],
"prompt_number": 7
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E8 : Pg 395"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.8\n",
"# calculation of focal length of a biconvex lens from known value of radii of curvature of refracting surfaces\n",
"\n",
"# given data\n",
"R1=20.; # radius of curvature(in cm) of first surface of biconvex lens\n",
"R2=-20.; # radius of curvature(in cm) of second surface of biconvex lens\n",
"mu=1.5; # refractive index of the material of lens\n",
"\n",
"# calculation\n",
"f=1./((mu-1.)*(1./R1-1./R2)); # lens maker's formula\n",
"\n",
"print'focal length(in cm) of the given biconvex lens is',f"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"focal length(in cm) of the given biconvex lens is 20.0\n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E9 : Pg 396"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.9\n",
"# calculation of size of the image of an object placed at a distance from a convex lens\n",
"\n",
"# given data\n",
"f=12. # focal length(in cm)\n",
"u=-8. # object distance(in cm)\n",
"h1=2.; # object height(in cm)\n",
"\n",
"# calculation\n",
"v=1./((1./f)+(1./u)); # lens formula\n",
"m=v/u; # lateral magnification formula for lens\n",
"h2=m*h1; # lateral magnification formula for lens\n",
"\n",
"if(h2>0) :\n",
" print'image is erect and is of length(in cm)',h2\n",
"else :\n",
" print'image is inverted and is of length(in cm)',h2"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"image is erect and is of length(in cm) 6.0\n"
]
}
],
"prompt_number": 9
},
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"WORKED EXAMPLES "
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E1w : Pg 400"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.1w\n",
"# calculation of position and nature of the image of an object placed at a distance from a concave mirror\n",
"\n",
"# given data\n",
"u=-8.; # object distance(in cm)\n",
"f=-10.; # focal length of the concave mirror(in cm)\n",
"\n",
"# calculation\n",
"v=1./((1./f)-(1./u)); # mirror formula\n",
"\n",
"if(v>0) :\n",
" print'virtual image is formed on right side of mirror at a distance(in cm)',v\n",
"else :\n",
" print'real image is formed on left side of mirror at a distance(in cm)',v"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"virtual image is formed on right side of mirror at a distance(in cm) 40.0\n"
]
}
],
"prompt_number": 11
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E2w : Pg 401"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.2w\n",
"# calculation of length of the image of an object placed horizontal at a distance from the mirror.\n",
"\n",
"# given data\n",
"u=-30.; # object distance of point A(in cm)\n",
"f=-10.; # focal length of the mirror(in cm)\n",
"# r=2f=20 cm\n",
"# image of B is formed at centre of curvature since it is located at the centre of curvature.\n",
"\n",
"# calculation\n",
"v=1./((1./f)-(1./u)); # mirror formula\n",
"\n",
"print'length(in cm) of the image is',v+(2*-f)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"length(in cm) of the image is 5.0\n"
]
}
],
"prompt_number": 12
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E3w : Pg 401"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.3w\n",
"# calculation of object distance for half image height as compared to original height in case of reflection by convex mirror\n",
"\n",
"# given data\n",
"m=.5; # magnification ratio\n",
"f=2.5; # focal length of the convex mirror(in m)\n",
"\n",
"# calculation\n",
"# (1/u)+(1/v)=(1/f); # mirror formula\n",
"# now m=-v/u=0.5\n",
"u=-f; # from formula taking v=-u/2 mirror formula gives this relation\n",
"\n",
"print'the boy should stand at a distance(in m) from the convex mirror',abs(u)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"the boy should stand at a distance(in m) from the convex mirror 2.5\n"
]
}
],
"prompt_number": 13
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E4w : Pg 401"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.4w\n",
"# calculation of image distance and focal length of concave mirror\n",
"\n",
"# given data\n",
"h1=2.; # height of object(in cm)\n",
"h2=-5.; # height of image(in cm)\n",
"u=-12.; # object distance in cm\n",
"\n",
"# calculation\n",
"v=-(h2/h1)*u # image distance(in cm) using formula of lateral magnification\n",
"\n",
"if(v<0) :\n",
" print'image is formed on same side of object at a distance(in cm)',-v\n",
"else :\n",
" print'image is formed on opposite side of mirror at a distance(in cm)',v\n",
"\n",
"f=(u*v)/(u+v); # mirror formula\n",
"\n",
"print'focal length(in cm) of the given concave mirror is',abs(f)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"image is formed on same side of object at a distance(in cm) 30.0\n",
"focal length(in cm) of the given concave mirror is 8.57142857143\n"
]
}
],
"prompt_number": 14
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E5w : Pg 401"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.5w\n",
"# calculation of maximum angle of reflection for a surface\n",
"\n",
"# given data\n",
"mu=1.25; # refractive index of medium\n",
"\n",
"# calculation\n",
"thetadashdash=53.1;#asind(1/mu); # critical angle for total internal reflection(in degree)\n",
"thetadash=36.9;#90-thetadashdash;\n",
"theta=48.6;#asind(mu*sind(thetadash)); # snell's law sin(theta)/sin(thetadash)=mu\n",
"\n",
"print'maximum value of theta(in degree) for total internal reflection at vertical surface',theta\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"maximum value of theta(in degree) for total internal reflection at vertical surface 48.6\n"
]
}
],
"prompt_number": 15
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E6w : Pg 402"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.6aw\n",
"# calculation of minimum refractive index for parallel emergence for given condition in right prism\n",
"\n",
"# given data\n",
"thetac=45.; # critical angle(in degree) for given conditions\n",
"\n",
"# calculation\n",
"mu=1.41;#1./(sind(thetac)); # anell's law\n",
"\n",
"print'for total internal reflection refractive index of material of given right prism should be greater than or equal to',mu\n",
" \n",
"#6b\n",
"# given data\n",
"mu=5./3.; # refracive index of the material of the right prism\n",
"\n",
"# calculation\n",
"thetac=36.9;#asind(1/mu) # snell's law\n",
"\n",
"if(thetac<60) :\n",
" print'total internal reflection does not take place for given conditions of right prism'\n",
"else :\n",
" print'total internal reflection do take place for given conditions of right prism'"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"for total internal reflection refractive index of material of given right prism should be greater than or equal to 1.41\n",
"total internal reflection does not take place for given conditions of right prism\n"
]
}
],
"prompt_number": 16
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E11w : Pg 403"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.11w\n",
"# locating image of a dust particle on the surface of water filled in a concave mirror as observed from top\n",
"\n",
"# given data\n",
"R=-40.; # radius of curvature(in cm) of the concave mirror\n",
"u=-5.; # object distance(in cm) from the concave mirror\n",
"mu=1.33; # refractive index of water\n",
"\n",
"# calculation\n",
"v=1./((2./R)-(1./u))# mirror formula\n",
"\n",
"if(v>0) :\n",
" print'virtual image is formed due to reflection through concave mirror below surface of mirror at a depth(in cm) of ',v\n",
"else :\n",
" print'real image is formed due to reflection through concave mirror above surface of mirror at a height(in cm) of ',v\n",
"\n",
"total_distance=v+(-u); # water is filled upto height equal to object distance of dust particle P\n",
"vfinal=total_distance*(1.-1./mu); # snell's law\n",
"\n",
"print'final image is formed below water surface at a distance(in cm)',total_distance-vfinal"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"virtual image is formed due to reflection through concave mirror below surface of mirror at a depth(in cm) of 6.66666666667\n",
"final image is formed below water surface at a distance(in cm) 8.77192982456\n"
]
}
],
"prompt_number": 17
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E12w : Pg 404"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.12w\n",
"# calculation of position of final image formed due to a system of glass slab and a concave mirror\n",
"\n",
"# given data\n",
"u=-21.; # object distance(in cm) from concave mirror\n",
"R=20.; # radius of curvature(in cm) of the concave mirror\n",
"mu=1.5; # refractive index of the glass'\n",
"t=3.; # thickness of glass slab(in cm)\n",
"\n",
"# calculation\n",
"tshift=t*(1.-1./mu); # snell's law\n",
"img_pos=-u-tshift; # image position with respect to glass slab,i.e object distance(in cm) of concave mirror\n",
"\n",
"if(img_pos==R) :\n",
" print'here img_pos is same as radius of curvature of concave mirror and thus final image is formed at P itself'"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"here img_pos is same as radius of curvature of concave mirror and thus final image is formed at P itself\n"
]
}
],
"prompt_number": 18
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E13w : Pg 404"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear; \n",
"# example 18.13w\n",
"# calculation angle of minimum deviation for equilateral prism of silicate flint glass from known vlue of wavelength\n",
"import math \n",
"# given data\n",
"A=60.; # angle of prism(in degree)\n",
"mu1=1.66; # refractive index of silicate flint glass for 400nm wavelength\n",
"mu2=1.61; # refractive index of silicate flint glass for 700nm wavelength\n",
"\n",
"# calculation\n",
"# mu=sind((A+deltam)/2)/sind(A/2) relation between refractive index and angle of minimum deviation by prism\n",
"deltam1=52.2;#2.*((asind(mu1*sind(A/2.)))-30.);\n",
"deltam2=47.2;#2.*((asind(mu2*sind(A/2.)))-30.);\n",
"\n",
"print'minimum angle of deviation(in degree) for 400nm wavelength in equilateral prism of silicate flint glass is',deltam1\n",
"print'minimum angle of deviation(in degree) for 700nm wavelength in equilateral prism of silicate flint glass is',deltam2"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"minimum angle of deviation(in degree) for 400nm wavelength in equilateral prism of silicate flint glass is 52.2\n",
"minimum angle of deviation(in degree) for 700nm wavelength in equilateral prism of silicate flint glass is 47.2\n"
]
}
],
"prompt_number": 19
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E14w : Pg 404"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.14w\n",
"# calculation of angle of rotation of the mirror in given setup\n",
"\n",
"# given data\n",
"mu=1.5; # refractive index of convex lens\n",
"A=4.; # angle of prism (in degree)\n",
"\n",
"# calculation\n",
"delta=(mu-1.)*A\n",
"\n",
"print'the mirror should be rotated by angle(in degree) of',delta"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"the mirror should be rotated by angle(in degree) of 2.0\n"
]
}
],
"prompt_number": 20
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E15w : Pg 405"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.15w\n",
"# calculation of location of the image of an object placed at a distance from the spherical convex surface\n",
"\n",
"# given data\n",
"u=-25.; # object distance(in cm)\n",
"R=20.; # radius of curvature of the spherical convex surface(in cm)\n",
"mu1=1.; # refractive index of the medium in which object is kept\n",
"mu2=1.5; # refractive index of the medium of spherical convex surface\n",
"\n",
"# calculation\n",
"v=mu2/((mu2-mu1)/R+(mu1/u)) # formula for refraction at spherical surface\n",
"\n",
"if(v>0) :\n",
" print'image is formed on the right of the separating surface at a distance(in cm) of',v\n",
"else :\n",
" print'image is formed on the left of the separating surface at a distance(in cm) of',v"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"image is formed on the left of the separating surface at a distance(in cm) of -100.0\n"
]
}
],
"prompt_number": 21
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E16w : Pg 405"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.16w\n",
"# calculation of height of the image of an object placed along axis ,at a distance from a horizontal cylindrical glass rod\n",
"\n",
"# given data\n",
"u=-20.; # object distance (in cm)\n",
"R=5.; # radius of curvature of the spherical convex surface (in cm)\n",
"mu1=1.; # refractive index of the medium in which object is kept\n",
"mu2=1.5; # refractive index of the medium of spherical concave surface\n",
"h1=.5; # height of the object in mm\n",
"\n",
"# calculation\n",
"v=mu2/((mu2-mu1)/R+(mu1/u)) # formula for refraction at spherical surface\n",
"m=(mu1*v)/(mu2*u); # lateral magnification ratio\n",
"\n",
"if(v>0) :\n",
" print'image is formed inside the rod at a distance(in cm) of',v\n",
"if(m==-1) :\n",
" print'the image will be of same height as the object and is inverted'\n",
"if(m==1) :\n",
" print'the image will be of same height as the object and is erect'"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"image is formed inside the rod at a distance(in cm) of 30.0\n",
"the image will be of same height as the object and is inverted\n"
]
}
],
"prompt_number": 22
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E17w : Pg 405"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.17w\n",
"# calculation of apparent depth of a air bubble inside a glass sphere\n",
"\n",
"# given data\n",
"u=-4.; # object distance (in cm)\n",
"R=-10.; # radius of curvature of the spherical glass sphere(in cm)\n",
"mu1=1.5; # refractive index of the glass sphere\n",
"mu2=1.; # refractive index of air bubble\n",
"\n",
"# calculation\n",
"v=mu2/((mu2-mu1)/R+(mu1/u)) # formula for refraction at spherical surface\n",
"\n",
"if(v<0) :\n",
" print'below the surface the bubble will appear at a distance(in cm) of',-v\n",
"else :\n",
" print'above the surface the bubble will appear at a distance(in cm) of',v"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"below the surface the bubble will appear at a distance(in cm) of 3.07692307692\n"
]
}
],
"prompt_number": 23
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E18w : Pg 405"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.18w\n",
"# calculation of position of image due to refraction at the first surface and position of final image\n",
"\n",
"# given data1\n",
"# u=infinite object distance (in cm)\n",
"R=2.; # radius of curvature of the spherical convex surface (in mm)\n",
"mu1=1.33; # refractive index of the medium from which light beam is entering\n",
"mu2=1.; # refractive index of the medium of spherical air bubble\n",
"nR=-2.; # radius of curvature of the spherical convex surface (in mm)\n",
"nmu1=1.; # refractive index of the medium in which previous image is formed\n",
"nmu2=1.33; # refractive index of the medium from which light beam is entering\n",
"\n",
"# calculation\n",
"v=R/(mu2-mu1) # formula for refraction at spherical surface for object at infinite distance\n",
"nu=-(-v+-(2.*nR))\n",
"\n",
"if(v<0) :\n",
" print'virtual image is formed on the same side of water at a distance(in mm) of',-v\n",
"else :\n",
" print'real image is formed on the other side of water at a distance(in mm) of',v\n",
"\n",
"nv=nmu2/((nmu2-nmu1)/nR+(nmu1/nu)) # formula for refraction at spherical surface\n",
"\n",
"if(nv<0) :\n",
" print'final image is formed on the same side of air at a distance(in mm) of',-nv\n",
"else :\n",
" print'final image is formed on the other side of air at a distance(in mm) of',nv\n",
"\n",
"print'from the centre first image is formed on the side from which incident rays are coming at a distance(in mm) of ',-v+R\n",
"print'from the centre second image is formed on the side from which incident rays are coming at a distance(in mm) of ',-nv+nR"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"virtual image is formed on the same side of water at a distance(in mm) of 6.06060606061\n",
"final image is formed on the same side of air at a distance(in mm) of 5.0303030303\n",
"from the centre first image is formed on the side from which incident rays are coming at a distance(in mm) of 8.06060606061\n",
"from the centre second image is formed on the side from which incident rays are coming at a distance(in mm) of 3.0303030303\n"
]
}
],
"prompt_number": 24
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E19w : Pg 406"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.19w\n",
"# calculation of focal length of thin lens \n",
"\n",
"# given data\n",
"R1=10.; # radius of curvature(in cm) of first surface of given lens\n",
"R2=20.; # radius of curvature(in cm) of second surface of given lens\n",
"mu=1.5; # refractive index of the material of lens\n",
"\n",
"# calculation\n",
"f=1./((mu-1.)*(1./R1-1./R2)); # lens maker's formula\n",
"\n",
"print'focal length(in cm) of the given lens is',f"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"focal length(in cm) of the given lens is 40.0\n"
]
}
],
"prompt_number": 25
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E20w : Pg 406"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.20w\n",
"# calculation of position of diverging mirror to obtain real image at the source itself for given system\n",
"\n",
"# given data\n",
"u=-15.; # object distance(in cm)\n",
"f=10.; # focal length(in cm) of converging lens\n",
"fm=12.; # focal length(in cm) of convex mirror\n",
"\n",
"# calculation\n",
"v=1./((1./f)+(1./u)); # lens formula\n",
"LI1=2.*abs(u);\n",
"MI1=2.*abs(fm);\n",
"LM=LI1-MI1;\n",
"\n",
"print'on the right of the lens mirror should be placed at a distance(in cm) of',LM"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"on the right of the lens mirror should be placed at a distance(in cm) of 6.0\n"
]
}
],
"prompt_number": 26
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E21w : Pg 407"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.21w\n",
"# calculation of separation between mirror and the lens for parallel emergence of the final beam\n",
"# given data\n",
"import math \n",
"from math import sqrt\n",
"u=-12.; # object distance(in cm)\n",
"f=15.; # focal length(in cm) of the converging lens\n",
"\n",
"# calculation\n",
"v=1./((1./f)+(1./u)); # lens formula\n",
"\n",
"if(v<0) :\n",
" print'image due to lens is formed on the left side of the lens at a distance(in cm) of',-v\n",
"else :\n",
" print'image due to lens is formed on the right side of the lens at a distance(in cm) of',v\n",
"\n",
"I1L=2.*abs(v);\n",
"LI2=abs(f);\n",
"I1I2=I1L+LI2;\n",
"\n",
"# let distance of mirror from I2 is x\n",
"# I1I2=75 cm\n",
"# u=-(75+x) cm\n",
"# v=-x cm\n",
"# f_mirror=-20 cm\n",
"# (1/v)+(1/u)=(1/f); mirror formula\n",
"# substituting u,v,f we get equation x**2+35*X-1500=0\n",
"\n",
"a=1.; # for above equation coefficient of x**2\n",
"b=35.; # for above equation coefficient of x**1\n",
"c=-1500.; # for above equation coefficient of x**0 or the constant\n",
"\n",
"x1=(-b+sqrt((b*b)-(4.*a*c)))/(2.*a); # first solution \n",
"x2=(-b-sqrt((b*b)-(4.*a*c)))/(2.*a); # second solution \n",
"# considering only the positive value of the solution ,as negative value has no physical meaning\n",
"if(x1>0) :\n",
" print'the separation(in cm) between the lens and the mirror is',f+x1,\n",
"if(x2>0) :\n",
" print'the separation(in cm) between the lens and the mirror is',f+x2"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"image due to lens is formed on the left side of the lens at a distance(in cm) of 60.0\n",
"the separation(in cm) between the lens and the mirror is 40.0\n"
]
}
],
"prompt_number": 27
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E22w : Pg 407"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.22w\n",
"# calculation of object distance from the lens with one side silvered\n",
"\n",
"# given data\n",
"v=-25.; # image distance (in cm)\n",
"R=25.; # radius of curvature of the spherical convex surface (in cm)\n",
"mu1=1.; # refractive index of the medium in which object is kept\n",
"mu2=1.5; # refractive index of the medium of lens\n",
"\n",
"# calculation\n",
"u=mu1/((mu2/v)-((mu2-mu1)/R)); # formula for refraction at spherical surface\n",
"\n",
"print'object should be placed at a distance(in cm) of',abs(u)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"object should be placed at a distance(in cm) of 12.5\n"
]
}
],
"prompt_number": 28
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E23w : Pg 407"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.23w\n",
"# calculation of location of image of an object placed in front of a concavo-convex lens made of glass\n",
"\n",
"# given data\n",
"R1=20.; # radius of curvature(in cm) of first surface of concavo-convex lens\n",
"R2=60.; # radius of curvature(in cm) of second surface of concavo-convex lens\n",
"mu=1.5; # refractive index of the material of lens\n",
"u=-80.; # object distance(in cm)\n",
"C1C2=160.; # coaxial distance(in cm) between both the lenses\n",
"\n",
"# calculation\n",
"f=1./((mu-1.)*(1./R1-1./R2)); # lens maker's formula\n",
"\n",
"print'focal length(in cm) of the given concavo-convex lens is',f\n",
"\n",
"v=1./((1./u)+(1./f)); # lens formula\n",
"\n",
"if(v>0) :\n",
" print'first image is formed on right side of first lens at a distance(in cm) of',v\n",
"else :\n",
" print'first image is formed on left side of first lens at a distance(in cm) of',-v\n",
"\n",
"ff=f; # focal length(in cm) of the second lens same as first lens\n",
"uf=v-C1C2 # object distance(in cm) for second lens since image by first lens acts as object of the second lens\n",
"vf=1./((1./uf)+(1./ff)); # lens formula\n",
"\n",
"if(vf>0) :\n",
" print'final image is formed on right side of second lens at a distance(in cm) of',vf\n",
"else :\n",
" print'final image is formed on left side of second lens at a distance(in cm) of',-vf"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"focal length(in cm) of the given concavo-convex lens is 60.0\n",
"first image is formed on right side of first lens at a distance(in cm) of 240.0\n",
"final image is formed on right side of second lens at a distance(in cm) of 34.2857142857\n"
]
}
],
"prompt_number": 29
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E24w : Pg 408"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.24w\n",
"# calculation of new focal length of a lens on immersing in water \n",
"\n",
"# given data\n",
"f=12.; # focal length(in cm) of the lens\n",
"mu1=1.; # refractive index of air\n",
"mu2=1.5; # refractive index of glass\n",
"mu3=1.33; # refractive index of water\n",
"# let (1/R1)-(1/R2)=a variable\n",
"\n",
"# calculation\n",
"a=1./((mu2/mu1-1.)*(f)) # refractive mediums in cascading\n",
"f_new=1./((mu2/mu3-1.)*a)# refractive mediums in cascading\n",
"\n",
"print'new focal length(in cm) of a lens on immersing it in water is',f_new\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"new focal length(in cm) of a lens on immersing it in water is 46.9411764706\n"
]
}
],
"prompt_number": 30
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E25w : Pg 408"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.25w\n",
"# calculation of location of final image for an object on the axis of a cylindrical tube containing water closed by an equiconvex lens\n",
"\n",
"# given data\n",
"u=-21.; # object distance(in cm)\n",
"f=10.; # focal length(in cm) of the lens\n",
"mu1=1.; # refractive index of air\n",
"mu2=1.5; # refractive index of lens\n",
"mu3=1.33; # refractive index of water\n",
"# v1 image due to refraction at the first surface\n",
"\n",
"# calculation\n",
"# from formula of refraction at the spherical surface\n",
"# (mu2/v1)-(1/u)=(mu2-mu1)/R (1)\n",
"# (mu3/v)-(mu2/v1)=(mu3-mu2)/-R (2)\n",
"# adding (1) and (2)\n",
"# (1/v)=(1/(2*R))-(1/28) (3)\n",
"# f=1/((mu2-1)*(1/R+1/R)) refractive surfaces in cascade\n",
"\n",
"R=2.*f*(mu2-1.) # refractive surfaces in cascade\n",
"v=1./((1./(2.*R))-(1./28.)) # from equation (3)\n",
"\n",
"print'the image is formed inside the cylindrical tube at distance(in cm) of',v"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"the image is formed inside the cylindrical tube at distance(in cm) of 70.0\n"
]
}
],
"prompt_number": 31
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E26w : Pg 409"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.26w\n",
"# calculation of new position of the slide of projector if the position of the screen is changed\n",
"\n",
"# given data\n",
"v=10.; # image distance(in m)\n",
"m=500.; # lateral magnification ratio\n",
"d=2.; # distance(in m) the screen is moved\n",
"\n",
"# calculation\n",
"u=-v/m; # lateral magnification formula\n",
"f=1./((1./v)-(1./u)) # lens formula\n",
"vdash=v-d # effect of moving screen d m closer\n",
"udash=1./((1./vdash)-(1./f)) # lens formula\n",
"\n",
"if(udash<0) :\n",
" print'away from the lens,the slide should be moved by a distance(in m) of',-udash\n",
"else :\n",
" print'towards the lens,the slide should be moved by a distance(in m) of',udash"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"away from the lens,the slide should be moved by a distance(in m) of 0.0200100050025\n"
]
}
],
"prompt_number": 32
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E27w : Pg 409"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.27w\n",
"# calculation of position of the object to get a focused image\n",
"\n",
"# given data\n",
"v=10.; # image distance(in cm) from the convex lens\n",
"u=-10.; # object distance(in cm) from the convex lens\n",
"mu=1.5; # refractive index of glass\n",
"t=1.5; # thickness(in cm) of the glass plate inserted\n",
"\n",
"# calculation\n",
"f=1./((1./v)-(1./u)) # lens formula\n",
"I1I=t*(1.-1./mu) # shift in position(in cm) of image due to glass plate\n",
"v_new=v-I1I # lens forms image at this distance(in cm) from itself\n",
"u_new=1./((1./v_new)-(1./f)) # lens formula\n",
" \n",
"print'from the lens,the object should be placed at a distance(in cm) of',abs(u_new)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"from the lens,the object should be placed at a distance(in cm) of 10.5555555556\n"
]
}
],
"prompt_number": 33
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E28w : Pg 409"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.28aw\n",
"# finding the image of a distant object formed by combination of two convex lens by using thin lens formula\n",
"\n",
"# given data\n",
"f=20.; # focal length(in cm) of the given convex lens\n",
"d=60.; # coaxial separation(in cm) between the two convex lenses\n",
"u=-(d-f); # object distance(in cm) for the second lens since first image is formed at focus of first lens\n",
"\n",
"# calculation\n",
"v=1./((1./u)+(1./f)); # lens formula\n",
"\n",
"print'final image is formed on the right of the second lens at a distance(in cm) of',v\n",
"\n",
"# developed in windows XP operating system 32bit\n",
"# platform Scilab 5.4.1\n",
"#clc;clear;\n",
"# example 18.28bw\n",
"# finding the image of a distant object formed by combination of two convex lens by using equivalent lens method\n",
"\n",
"# given data\n",
"f1=20.; # focal length(in cm) of the first convex lens\n",
"f2=20.; # focal length(in cm) of the first convex lens\n",
"d=60.; # coaxial separation(in cm) between the two convex lenses\n",
"\n",
"# calculation\n",
"F=1./((1./f1)+(1./f2)-(d/(f1*f2))); # equivalent focal length formula for equivalent lens method\n",
"D=d*F/f1; # distance(in cm) from the second lens at which equivalent lens is to be placed\n",
"# image of distant object is formed at focus of equivalent lens\n",
"\n",
"print'on right side of the second lens,the final image is formed at a distance(in cm) of ',abs(D)-abs(F)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"final image is formed on the right of the second lens at a distance(in cm) of 40.0\n",
"on right side of the second lens,the final image is formed at a distance(in cm) of 40.0\n"
]
}
],
"prompt_number": 34
}
],
"metadata": {}
}
]
}