import numpy as np class beam: def __init__(self): '''light beam class''' # source of light beam; default (0,0) beam.origin = np.array([]) # k-vector or direction of light beam; default (1,1) beam.k = np.array([]) # intensity of light beam; default max beam.intensity = 1.0 # if beam starts at a face, the face index; default none beam.face = None # 0 for s-polarization 1 for p-polarization; default s beam.polarization = 0 # status: incoming, reflected, or refracted; default incoming beam.status = 'incoming' class face: def __init__(self): '''prism face class''' # first vertex point face.vertex1 = np.array([]) # second vertex point face.vertex2 = np.array([]) # left (right) side is left (right) of line from vertex 1 to 2 # index of refraction for the left side face.nLeft = np.array([]) # index of refraction for the right side face.nRight = np.array([]) class border: def __init__(self): border.vertex1 = np.array([]) border.vertex2 = np.array([]) border.nLeft = np.array([]) border.nRight = np.array([])