...

/

Solution Review: Setting Up an Optical System

Solution Review: Setting Up an Optical System

Solution review to the tasks in setting up an optical system.

Solution 1 #

Press + to interact
import numpy as np
C1 = np.array([[1, -1],[1, 0]])
C2 = np.array([[1, 1],[1, 0]])
C3 = np.array([[1, -1],[1, 1]])
C4 = np.array([[1, 0],[0, 1]])
C5 = np.array([[0, 1],[1, 1]])
C6 = np.array([[1, 0],[0, 1]])
arrs = [C1, C2, C3, C4, C5, C6]
system = np.array([[1, 0],[0, 1]]) # unit martrix
for i in range(len(arrs)):
system = np.dot(system, arrs[i])
print(system)

Explanation

  • In lines 3 - 8, we have defined the matrices C1C6C_1 - C_6 ...