From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1958/CH7/EX7.1/Chapter7_example1.sce | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 1958/CH7/EX7.1/Chapter7_example1.sce (limited to '1958/CH7/EX7.1/Chapter7_example1.sce') diff --git a/1958/CH7/EX7.1/Chapter7_example1.sce b/1958/CH7/EX7.1/Chapter7_example1.sce new file mode 100755 index 000000000..b7929842e --- /dev/null +++ b/1958/CH7/EX7.1/Chapter7_example1.sce @@ -0,0 +1,18 @@ +clc +clear +//Input data +f1=-12//Focal length of a converging lens in cm +f2=25//Focal length of a diverging lens in cm +d=8//Distance between the lens in cm + +//Calculations +C=(1/f1)+(1/f2)+(d/(f1*f2))//Inverse of focal length in cm^-1 +D=(d/f2)+1//Constant value +A=(d/f1)+1//Constant value +O1F1=(-D/C)//Poistion of cardinal point in cm +O2F2=(A/C)//Poistion of cardinal point in cm +O1H1=(1-D)/C//Poistion of cardinal point in cm +O2H2=(A-1)/C//Poistion of cardinal point in cm + +//Output +printf('Position of cardinal points are O1F1 = %3.2f cm, O2F2 = %3.2f cm, O1H1 = %3.2f cm, O2H2 = %3.2f cm\n The system is in air, therfore, nodal points coincide with unit points',O1F1,O2F2,O1H1,O2H2) -- cgit