...
Solution Review: Setting Up an Optical System
Solution review to the tasks in setting up an optical system.
import numpy as npC1 = 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 martrixfor i in range(len(arrs)): system = np.dot(system, arrs[i]) print(system)
In lines 3 - 8, we have defined the matrices C1−C6C_1 - C_6C1−C ...