blob: 83546b64d61776b158abb2f95e8c05b7d76293f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
clc
clear
//Input data
r=1.5//Refractive index of the material of a thin lens
f=-20//Focal length of the lens in cm
rx=-6//Ratio of radii of curvature of lens
//Calculations
r1=1/((1/f)/((r-1)*(1-(1/rx))))//Radius of curvature of convergent lens in cm
r2=(rx*r1)//Radius of curvature of divergent lens in cm
//Output
printf('Radii of curvature of lens are %3.2f cm and %i cm',r1,r2)
|