#A thick lens is set up so the first surface is in air and the second surface is in a fluid with nf = 1.30. The
#lens itself has an index of refraction of nL = 1.60. The lens is 2.0 cm thick and both faces of the lens
#have the same radius of curvature of R1 = R2 = 1.5 cm.
import numpy as np
# Knowns
na = 1.00
nf = 1.30
nl = 1.60
tl = 2.0
r1 = 1.5
r2 = -1.5
#(a) Find the cardinal points for this system (the locations of the principal planes, the focal lengths,
#and the nodal points). Add a sketch showing all locations.
R1 = np.array([[1,0],[(na-nl)/(nl*r1),na/nl]])
T = np.array([[1,tl],[0,1]])
R2 = np.array([[1,0],[(nl-nf)/(nf*r2),nl/nf]])
L = R2@T@R1
print('L =\n',L)
#Pulling out values from M matrix
A = L[0][0]
B = L[0][1]
C = L[1][0]
D = L[1][1]
#
p = D/C
q = -A/C
r = (D-(na/nf))/C
s = (1-A)/C
v = (D-1)/C
w = ((na/nf)-A)/C
f1 = p-r
f2 = q-s
F1 = p
pp1 = r
node1 = v
F2 = q + tl
pp2 = w + tl
node2 = s + tl
print("Principle Planes:\nPP1:",pp1, "\nPP2:",pp2)
print("Nodal Points:\nN1:",node1, "\nN2:",node2)
print("Focal Points:\nF1:",F1,"\nF2:",F2)
L =
[[ 0.5 1.25 ]
[-0.38461538 0.57692308]]
Principle Planes:
PP1: 0.49999999999999967
PP2: 1.3000000000000003
Nodal Points:
N1: 1.0999999999999999
N2: 0.7000000000000002
Focal Points:
F1: -1.5
F2: 3.3
b) In many of the examples we’ve seen, the front and back focal distances have been the same. Why are f1 and f2 different from each other for this example? They are different because the surrounding material is different on either side of the lens. This creates a variation in the focal lengths
c) Are the nodal points coincident with the principal planes for this case? Why or why not? They are not, partial because the whole mirror is not symmetrical due to the different surroundings, and partially because nodal points typically do not correspond to the planes
#(d) Draw a ray diagram for an object 30 cm to the left of the first surface. Find the image location by
#drawing in the three "easy" rays.
#(e) Calculate the location of the image in the above question mathematically.
objD = 30
theta2 = -1/(objD-F1)#-np.arctan(1/(objD-F1))
ray1 = np.array([[1],[0]])
ray2 = np.array([[1],[theta2]])
Tray2 = np.array([[1,objD+pp2],[0,1]])
ray3 = L@ray1
ray4 = L@Tray2@ray2
print("Ray 1:\n",ray1, "\nRay 2:\n", ray2)
print("Ray 3:\n",ray3, "\nRay 4:\n", ray4)
imageDistance = -(ray3[0]-ray4[0])*ray4[1]+pp2
print(imageDistance)
Ray 1:
[[1]
[0]]
Ray 2:
[[ 1. ]
[-0.03174603]]
Ray 3:
[[ 0.5 ]
[-0.38461538]]
Ray 4:
[[-0.03650794]
[-0.02075702]]
[1.31113631]
#(f ) If the medium after the lens was air (i.e. if nf = 1), how would the location of the cardinal points
#change?
nf = 1
R1 = np.array([[1,0],[(na-nl)/(nl*r1),na/nl]])
T = np.array([[1,tl],[0,1]])
R2 = np.array([[1,0],[(nl-nf)/(nf*r2),nl/nf]])
L = R2@T@R1
#Pulling out values from M matrix
A = L[0][0]
B = L[0][1]
C = L[1][0]
D = L[1][1]
#
p = D/C
q = -A/C
r = (D-(na/nf))/C
s = (1-A)/C
v = (D-1)/C
w = ((na/nf)-A)/C
f1 = p-r
f2 = q-s
F1 = p
pp1 = r
node1 = v
F2 = q + tl
pp2 = w + tl
node2 = s + tl
print("Principle Planes:\nPP1:",pp1, "\nPP2:",pp2)
print("Nodal Points:\nN1:",node1, "\nN2:",node2)
print("Focal Points:\nF1:",F1,"\nF2:",F2)
Principle Planes:
PP1: 0.8333333333333333
PP2: 1.1666666666666667
Nodal Points:
N1: 0.8333333333333333
N2: 1.1666666666666667
Focal Points:
F1: -0.8333333333333331
F2: 2.833333333333333
#(a) Find the system matrix for this lens pair and locate the cardinal points. Sketch the lenses, showing the location of all cardinal points.
tL1 = 1
nL1 = 1.52
rL1 = 20
tL2 = .5
nL2 = 1.62
rL2 = 20
R11 = np.array([[1,0],[(1-nL1)/(nL1*rL1),1/nL1]])
T1 = np.array([[1,tL1],[0,1]])
R21 = np.array([[1,0],[(nL1-nL2)/(nL2*-rL1),nL1/nL2]])
L1 = R21@T1@R11
R12 = np.array([[1,0],[(nL1-nL2)/(nL2*-rL1),nL1/nL2]])
T2 = np.array([[1,tL2],[0,1]])
R22 = np.array([[1,0],[(nL2-1)/(1*rL2),nL2/1]])
L2 = R22@T2@R12
M = L1@L2
A2 = M[0][0]
B2 = M[0][1]
C2 = M[1][0]
D2 = M[1][1]
#
p2 = D2/C2
q2 = -A2/C2
r2 = (D2-(1))/C
s2 = (1-A2)/C2
v2 = (D2-1)/C2
w2 = ((1)-A2)/C2
f1_2 = p2-r2
f2_2 = q2-s2
F1_2 = p2
pp1_2 = r2
node1_2 = v2
F2_2 = q2 + tL1 + tL2
pp2_2 = w2 + tL1 + tL2
node2_2 = s2 + tL1 + tL2
print("Principle Planes:\nPP1:",pp1_2, "\nPP2:",pp2_2)
print("Nodal Points:\nN1:",node1_2, "\nN2:",node2_2)
print("Focal Points:\nF1:",F1_2,"\nF2:",F2_2)
Principle Planes:
PP1: 0.09290218716659043
PP2: 0.6250790630834934
Nodal Points:
N1: -6.000718525302711
N2: 0.6250790630834934
Focal Points:
F1: 101.65226411370907
F2: -107.02790357592828
#(b) Back in section 2-10 we found that the effective focal length of two lenses in direct contact is
# Find the focal lengths of the two lenses by themselves and use this equation to find
#the effective focal length.
#(c) The prevoius result is quite a bit different from the focal length found using the matrix method.
#Why don’t these results agree? Which do you think is more likely to be correct?