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

半截六面體

單位向量

單位點

座標軸

xy平面

x

y

z

α = 1.0471975511965976 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
β = 1.3962634015954636 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
L = 3 (slider from 1 to 10, step 1)
O = (29.8, 12.78)
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)
h = false
i = false
j = false
k = false
A_1: O + u + v + w
A_2: O + u + v - w
A_3: O + u - v - w
A_4: O - u - v - w
A_5: O - u + v + w
A_6: O - u + v - w
A_7: O + u - v + w
A_8: O - u - v + w
A = Midpoint(A_5, A_1)
B = Midpoint(A_6, A_2)
C = Midpoint(A_4, A_6)
D = Midpoint(A_4, A_3)
E = Midpoint(A_3, A_2)
F = Midpoint(A_7, A_3)
G = Midpoint(A_8, A_5)
H = Midpoint(A_8, A_7)
I = Midpoint(A_7, A_1)
J = Midpoint(A_5, A_6)
K = Midpoint(A_8, A_4)
c_1 = Segment(G, J)
d_1 = Segment(J, B)
M = Midpoint(A_1, A_2)
e_1 = Segment(J, A)
f_1 = Segment(G, A)
g_1 = Segment(C, B)
h_1 = Segment(G, K)
i_1 = Segment(K, C)
j_1 = Segment(J, C)
k_1 = Segment(B, M)
l_1 = Segment(A, M)
m_1 = Segment(M, E)
n_1 = Segment(B, E)
p_1 = Segment(D, E)
q_1 = Segment(F, E)
r_1 = Segment(D, F)
s_1 = Segment(I, M)
t_1 = Segment(A, I)
a_2 = Segment(G, H)
b_2 = Segment(I, H)
c_2 = Segment(I, F)
d_2 = Segment(H, F)
e_2 = Segment(D, C)
f_2 = Segment(K, H)
g_2 = Segment(D, K)
a = Segment(I, F)
poly1, a_1, j_2, b, m = Polygon(A, J, B, M)
poly2, m_2, i_2, f, e = Polygon(M, I, F, E)
poly3, f_3, h_2, k_2, d = Polygon(F, H, K, D)
poly4, k_3, g, j_3, c = Polygon(K, G, J, C)
poly5, g_3, h_3, i_3, a_3 = Polygon(G, H, I, A)
poly6, d_3, e_3, b_1, c_3 = Polygon(D, E, B, C)
poly7, a_4, j_4, g_4 = Polygon(J, G, A)
poly8, b_3, j_5, c_4 = Polygon(J, C, B)
poly9, k_4, h_4, g_5 = Polygon(H, G, K)
poly10, c_5, k_5, d_4 = Polygon(K, D, C)
poly11, m_3, a_5, i_4 = Polygon(A, I, M)
poly12, e_4, m_4, b_4 = Polygon(M, B, E)
poly13, f_4, i_5, h_5 = Polygon(I, H, F)
poly14, d_5, f_5, e_5 = Polygon(F, E, D)