diff options
author | prashantsinalkar | 2020-04-14 10:19:27 +0530 |
---|---|---|
committer | prashantsinalkar | 2020-04-14 10:23:54 +0530 |
commit | 476705d693c7122d34f9b049fa79b935405c9b49 (patch) | |
tree | 2b1df110e24ff0174830d7f825f43ff1c134d1af /Concise_Physics_by_H_Matyaka/5-Light.ipynb | |
parent | abb52650288b08a680335531742a7126ad0fb846 (diff) | |
download | all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.tar.gz all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.tar.bz2 all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.zip |
Initial commit
Diffstat (limited to 'Concise_Physics_by_H_Matyaka/5-Light.ipynb')
-rw-r--r-- | Concise_Physics_by_H_Matyaka/5-Light.ipynb | 217 |
1 files changed, 217 insertions, 0 deletions
diff --git a/Concise_Physics_by_H_Matyaka/5-Light.ipynb b/Concise_Physics_by_H_Matyaka/5-Light.ipynb new file mode 100644 index 0000000..d8aaa79 --- /dev/null +++ b/Concise_Physics_by_H_Matyaka/5-Light.ipynb @@ -0,0 +1,217 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Light" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1: minimum_deviation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//INPUT DATA\n", +"np=1.39 //refractive index of prism\n", +"nl=1.29 //refractive index of liquid\n", +"a=62 //refracting angle of prism\n", +"//calculation\n", +"x=np*sind(62/2)/nl//snells law\n", +"y=asind(x)\n", +"d=(y*2)-a//minimum deviation\n", +"//output\n", +"printf('the minimum deviation is %3.3f degree',d)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2: incidence_and_prism_angle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//INPUT DATA\n", +"np=1.39 //refractive index in air\n", +"a=62 //refracting angle of prism\n", +"//calculation\n", +"x=1/np\n", +"c=asind(x)//critical angle\n", +"r=a-c\n", +"i= np* sind(r)//snells law\n", +"i1=asind(i)\n", +"A=2*c//greatest prism angle allowing refraction\n", +"//output\n", +"printf('angle of incidence producing maximum deviation is %3.3f deg',r)\n", +"printf(' \n greatest prism angle allowing refraction is %3.3f deg',A)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3: position_and_nature_of_image.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//input\n", +"f=0.15 //focal length\n", +"u=0.2 //distance of object\n", +"//calculation\n", +"x=(1/-f)-(1/u)//lens formula\n", +"y=1/x\n", +"m=y/u//linear magnification\n", +"//output\n", +"printf('the position of image is %3.3f m',y)\n", +"printf('\n linear magnification is %3.3f hence image is diminished',m)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4: position_of_image.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//input\n", +"f1=0.25 //focal length of diverging lens\n", +"f2=0.2 //focal length of converging lens\n", +"//calculation\n", +"x=(1/-f1)+(1/f2)//lens formula\n", +"y=1/x\n", +"a=(1/y)-(1/0.15)//lens formula\n", +"b=1/a\n", +"//output\n", +"printf('the position of image is %3.3f m hence the image is virtual',b)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5: position_and_nature_of_image.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//input\n", +"f=0.5 //focal length \n", +"u=0.8 //distance of object \n", +"f1=0.2 //focal length of converging lens\n", +"d=1 //distance behind the first lens\n", +"//calculation\n", +"x=(1/f)-(1/u)//lens formula\n", +"y=1/x\n", +"u1=-(y-d)//second lens \n", +"a=1/f1 +(1/-u1)//lens formula\n", +"b=1/a\n", +"//output\n", +"printf('the image lies %3.3f m behind second lens',b)\n", +"printf('\n the image is %3.3f m behind first lens',b+d)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6: lens_values.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//input\n", +"F=5 //power of lenses\n", +"f1=0.45 //focal length\n", +"//calculation\n", +"x=F-(1/f1)//lens formula\n", +"f2=1/x\n", +"//output\n", +"printf('the focal length is %3.3f m',f2)\n", +"printf('\n the power is %3.3f dioptre',x)" + ] + } +], +"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 +} |