blob: d4ee631783113231a01c3da28cded71227106ced (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
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([])
|