202610091320
This commit is contained in:
1 parent
249289e401
commit
57b2fc1919
1 file changed
+8
-4
@@ -9,16 +9,20 @@ from color import wavelength_to_rgb
|
||||
wavelen_min_nm = 380
|
||||
wavelen_max_nm = 750
|
||||
wavelen_step_nm = 1
|
||||
"""
|
||||
wavelens = [404.66e-9, 435.83e-9, 546.07e-9, 576.96e-9, 579.00e-9]
|
||||
"""
|
||||
wavelens = []
|
||||
for i in range(wavelen_min_nm, wavelen_max_nm, wavelen_step_nm):
|
||||
wavelens.append(i * 10**-9)
|
||||
|
||||
|
||||
beta_i = pi/2
|
||||
gamma_i = pi/4
|
||||
gamma_i = pi/2
|
||||
grating_c = 1400 * 10**-9
|
||||
cos_alpha_i = sqrt(1 - cos(beta_i)**2 - cos(gamma_i)**2)
|
||||
alpha_i = acos(cos_alpha_i)
|
||||
diffraction_orders = [0, 1]
|
||||
diffraction_orders = [2, 3]
|
||||
|
||||
colorlist = []
|
||||
|
||||
@@ -30,7 +34,7 @@ for wavelen in wavelens:
|
||||
|
||||
"""
|
||||
"""
|
||||
colorlist.append((0-cos_alpha_i, 0-cos(beta_i), 0-cos(gamma_i)))
|
||||
colorlist.append((0, 0, 0))
|
||||
sorrow_light.append([
|
||||
-cos_alpha_i,
|
||||
-cos(beta_i),
|
||||
@@ -60,7 +64,7 @@ fig = plt.figure()
|
||||
ax = fig.add_subplot(111, projection="3d")
|
||||
ax.quiver(X, Y, Z, U, V, W, colors=colorlist, arrow_length_ratio=0)
|
||||
|
||||
ax.set_xlim([-1, 1])
|
||||
ax.set_xlim([-1, 0])
|
||||
ax.set_ylim([-1, 1])
|
||||
ax.set_zlim([-1, 1])
|
||||
ax.set_xlabel('X Label')
|
||||
|
||||
Reference in new issue
Block a user