summaryrefslogtreecommitdiff
path: root/beam_tracing/python/classes.py
diff options
context:
space:
mode:
Diffstat (limited to 'beam_tracing/python/classes.py')
-rw-r--r--beam_tracing/python/classes.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/beam_tracing/python/classes.py b/beam_tracing/python/classes.py
new file mode 100644
index 0000000..d4ee631
--- /dev/null
+++ b/beam_tracing/python/classes.py
@@ -0,0 +1,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([]) \ No newline at end of file