3D 座標架的製作
Author: 藍邦偉  老師

立體物件

單位向量

單位點

座標軸

xy平面

x

y

z

α = 5.235987755982989 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
β = 5.323254218582705 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
L = 4 (slider from 1 to 10, step 1)
O = (31.284115419079306, 12.919162580642627)
X_{unit}: O + (cos(α), sin(α) * cos(β))
Y_{unit}: O + (-sin(α), cos(α) * cos(β))
Z_{unit}: O + (0, -sin(β))
u = Vector(O, X_{unit})
v = Vector(O, Y_{unit})
w = Vector(O, Z_{unit})
x_{Axis} = Vector(O - L * u, O + L * u)
y_{Axis} = Vector(O - L * v, O + L * v)
z_{Axis} = Vector(O - L * w, O + L * w)
多邊形1, d, e, f, g = Polygon(O + L * u + L * v, O - L * u + L * v, O - L * u - L * v, O + L * u - L * v)
h = false
i = false
j = false
k = false
B_1: O + 2 * u + 0.5 * v - 0.5 * w
A: O + 2 * u - 0.5 * v - 0.5 * w
B: O + 2 * u + 0.5 * w
a_{16} = Segment(B, A)
a_1 = Segment(B, B_1)
c_3 = Segment(A, B_1)
D: O + 0.5 * u - 0.5 * w
E: O + 0.5 * u - 0.5 * v + 0.5 * w
c_{14} = Segment(D, B_1)
b_{11} = Segment(E, B)
a_5 = Segment(E, D)
G: O - 2 * u + 0.5 * v - 0.5 * w
H: O - 2 * u - 0.5 * v - 0.5 * w
F: O - 0.5 * u - 0.5 * w
J: O - 0.5 * u + 0.5 * v + 0.5 * w
a_9 = Segment(J, F)
c_1 = Segment(F, H)
K: O - 2 * u + 0.5 * w
b_8 = Segment(J, K)
a_8 = Segment(G, K)
a_{11} = Segment(K, H)
c_{10} = Segment(G, H)
c_{11} = Segment(A, D)
C: O + 0.5 * u + 0.5 * v + 0.5 * w
a_{14} = Segment(D, C)
b_4 = Segment(B, C)
M: O - 0.5 * u - 0.5 * v + 0.5 * w
b_6 = Segment(K, M)
c_7 = Segment(G, F)
a_4 = Segment(M, F)
T: O + 0.5 * v - 0.5 * w
U: O - 0.5 * v - 0.5 * w
V: O + 0.5 * u + 2 * v - 0.5 * w
W: O - 0.5 * u + 2 * v - 0.5 * w
Z: O + 0.5 * u - 2 * v - 0.5 * w
A_1: O - 0.5 * u - 2 * v - 0.5 * w
c_8 = Segment(Z, U)
c_9 = Segment(Z, A_1)
c_4 = Segment(U, A_1)
c_5 = Segment(T, V)
c_6 = Segment(W, T)
c_2 = Segment(V, W)
C_1: O + 2 * v + 0.5 * w
D_1: O - 2 * v + 0.5 * w
a_6 = Segment(C_1, W)
a_7 = Segment(C_1, V)
a_{10} = Segment(D_1, A_1)
a_{12} = Segment(D_1, Z)
b_1 = Segment(C, C_1)
b_{10} = Segment(J, C_1)
a_{13} = Segment(T, J)
a_{15} = Segment(T, C)
b_{12} = Segment(D_1, M)
b_3 = Segment(D_1, E)
a_2 = Segment(M, U)
a_3 = Segment(E, U)
c_{12} = Segment(T, D)
c_{13} = Segment(D, U)
c_{15} = Segment(F, U)
c_{16} = Segment(T, F)
b_2 = Segment(C, E)
b_5 = Segment(M, E)
b_7 = Segment(J, C)
b_9 = Segment(J, M)
poly1, j_1, c_{17}, c = Polygon(C_1, C, J)
poly2, c_{18}, b, e_1 = Polygon(B, E, C)
poly3, e_2, m, j_2, c_{19} = Polygon(E, M, J, C)
poly4, j_3, m_1, k_1 = Polygon(M, K, J)
poly5, d_1, e_3, m_2 = Polygon(E, M, D_1)
poly6, a_{17}, z, u_1 = Polygon(Z, U, A_1)
poly7, u_2, d_2, t, f_1 = Polygon(U, D, T, F)
poly8, g_1, f_2, h_1 = Polygon(F, H, G)
poly9, w_1, t_1, v_1 = Polygon(T, V, W)
poly10, a, d_3, b_{13} = Polygon(D, B_1, A)