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

截八面體

單位向量

單位點

座標軸

xy平面

顯示作法

x

y

z

α = 3.6302848441482056 rad (slider from 0*° to 6.283185307179586, step 0.1*°)
β = 4.886921905584122 rad (slider from 0 to 6.283185307179586, step 0.1*°)
L = 4 (slider from 1 to 10, step 1)
O = (39.4176253239768, 6.096204036471585)
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)
A = (20.64, 16.56)
h = false
i = false
j = false
k = false
l = true
A_0: O + v + 2 * w
A_1: O + v - 2 * w
A_2: O - v - 2 * w
A_3: O - v + 2 * w
A_4: O + 2 * v + w
A_5: O + 2 * v - w
A_6: O - 2 * v - w
A_7: O - 2 * v + w
A_8: O + u + 2 * v
A_9: O + u - 2 * v
B_0: O - u - 2 * v
B_1: O - u + 2 * v
B_2: O + 2 * u + v
B_3: O + 2 * u - v
B_4: O - 2 * u - v
B_5: O - 2 * u + v
B_6: O + 2 * u + w
B_7: O + 2 * u - w
B_8: O - 2 * u - w
B_9: O - 2 * u + w
C_0: O + u + 2 * w
C_1: O + u - 2 * w
C_2: O - u - 2 * w
C_3: O - u + 2 * w
a = Segment(A_4, A_8)
b = Segment(A_8, A_5)
c = Segment(B_1, A_5)
m = Segment(A_4, B_1)
n = Segment(B_6, B_3)
p = Segment(B_3, B_7)
q = Segment(B_2, B_7)
r = Segment(B_6, B_2)
s = Segment(A_7, B_0)
t = Segment(A_7, A_9)
a_1 = Segment(B_0, A_6)
b_1 = Segment(A_9, A_6)
c_1 = Segment(B_9, B_5)
d_1 = Segment(B_9, B_4)
e_1 = Segment(B_4, B_8)
f_1 = Segment(B_5, B_8)
g_1 = Segment(C_3, A_3)
h_1 = Segment(A_0, C_0)
i_1 = Segment(A_3, C_0)
j_1 = Segment(C_3, A_0)
k_1 = Segment(A_1, C_2)
l_1 = Segment(A_2, C_1)
m_1 = Segment(A_1, C_1)
n_1 = Segment(C_2, A_2)
p_1 = Segment(A_9, B_3)
q_1 = Segment(A_6, A_2)
r_1 = Segment(B_7, C_1)
t_1 = Segment(A_1, A_5)
s_1 = Segment(B_2, A_8)
a_2 = Segment(C_0, B_6)
b_2 = Segment(A_0, A_4)
c_2 = Segment(C_3, B_9)
d_2 = Segment(B_5, B_1)
e_2 = Segment(B_0, B_4)
f_2 = Segment(A_7, A_3)
g_2 = Segment(C_2, B_8)
poly1, a_3, c_3, a_4, c_4 = Polygon(A_2, C_1, A_1, C_2)
poly2, a_6, a_5, c_5, b_8, b_4, b_0 = Polygon(A_6, A_2, C_2, B_8, B_4, B_0)
poly3, b_3, b_7, c_6, a_7, a_8, a_9 = Polygon(B_3, B_7, C_1, A_2, A_6, A_9)
poly4, b_5, b_6, c_7, a_{10}, a_{11}, a_{12} = Polygon(B_2, B_7, C_1, A_1, A_5, A_8)
poly5, c_0, b_9, b_{10}, a_{13}, a_{14}, a_0 = Polygon(C_0, B_6, B_2, A_8, A_4, A_0)
poly6, c_8, a_{15}, c_9, a_{16} = Polygon(C_3, A_3, C_0, A_0)
poly7, a_{17}, a_{18}, b_{11}, b_{12}, b_{13}, c_{10} = Polygon(A_3, A_7, B_0, B_4, B_9, C_3)
poly8, a_{19}, a_{20}, a_{21}, b_{14}, b_{15}, c_{11} = Polygon(A_3, A_7, A_9, B_3, B_6, C_0)
poly9, a_{22}, a_{23}, b_{16}, b_{17}, b_{18}, c_{12} = Polygon(A_0, A_4, B_1, B_5, B_9, C_3)
poly10, a_{24}, b_{19}, a_{25}, a_{26} = Polygon(A_7, B_0, A_6, A_9)
poly11, b_{20}, b_{21}, b_{22}, b_{23} = Polygon(B_6, B_3, B_7, B_2)
poly12, a_{27}, a_{28}, a_{29}, b_{24} = Polygon(A_4, A_8, A_5, B_1)
poly13, b_{25}, a_{30}, a_{31}, c_{13}, b_{26}, b_{27} = Polygon(B_1, A_5, A_1, C_2, B_8, B_5)
poly14, b_{28}, b_{29}, b_{30}, b_{31} = Polygon(B_9, B_5, B_8, B_4)