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

石中劍

單位向量

單位點

座標軸

xy平面

x

y

z

α = 2.0943951023931953 rad (slider from 0*° to 360*°, step 0.017453292519943295)
β = 4.4505895925855405 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
L = 12 (slider from 1 to 20, step 1)
O = (33.96217532655057, 15.008236876023851)
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_1 = 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
A_2: O + 5 * u - 5 * v + 10 * w
A_1: O + 5 * u + 5 * v + 10 * w
A_3: O + 5 * u - 8 * v + 5 * w
A_4: O + 5 * u - 5 * v
A_5: O + 5 * u + 5 * v
A_6: O + 5 * u + 8 * v + 5 * w
a = Segment(A_2, A_1)
c = Segment(A_1, A_6)
l = Segment(A_6, A_5)
m = Segment(A_5, A_4)
n = Segment(A_4, A_3)
p = Segment(A_3, A_2)
A_7: A_1 + 8 * u
A_8: A_2 + 8 * u
A_9: A_3 + 8 * u
A_{10}: A_4 + 8 * u
A_{11}: A_5 + 8 * u
A_{12}: A_6 + 8 * u
q = Segment(A_8, A_7)
r = Segment(A_7, A_{12})
s = Segment(A_{12}, A_{11})
a_1 = Segment(A_{11}, A_{10})
b_1 = Segment(A_{10}, A_9)
c_1 = Segment(A_9, A_8)
d_1 = Segment(A_8, A_2)
e_1 = Segment(A_7, A_1)
f_1 = Segment(A_{12}, A_6)
h_1 = Segment(A_{11}, A_5)
i_1 = Segment(A_{10}, A_4)
j_1 = Segment(A_9, A_3)
B_1: O + 7 * u + 3 * v + 14 * w
B_2: O + 7 * u - 3 * v + 14 * w
B_3: O + 7 * u + 7 * v + 17 * w
B_4: O + 7 * u - 7 * v + 17 * w
B_6: O + 7 * u - 2 * v + 17 * w
B_5: O + 7 * u + 2 * v + 17 * w
k_1 = Segment(B_2, B_4)
l_1 = Segment(B_4, B_6)
m_1 = Segment(B_1, B_3)
n_1 = Segment(B_3, B_5)
B_7: O + 7 * u + 2 * v + 22 * w
B_8: O + 7 * u - 2 * v + 22 * w
p_1 = Segment(B_8, B_6)
q_1 = Segment(B_8, B_7)
r_1 = Segment(B_7, B_5)
B_9: B_1 + 2 * u
B_{10}: B_2 + 2 * u
B_{11}: B_3 + 2 * u
B_{12}: B_4 + 2 * u
B_{13}: B_5 + 2 * u
B_{14}: B_6 + 2 * u
B_{15}: B_7 + 2 * u
B_{16}: B_8 + 2 * u
s_1 = Segment(B_{16}, B_{15})
t_1 = Segment(B_{15}, B_{13})
a_2 = Segment(B_{13}, B_{11})
b_2 = Segment(B_{11}, B_9)
c_2 = Segment(B_{16}, B_{14})
d_2 = Segment(B_{14}, B_{12})
e_2 = Segment(B_{12}, B_{10})
f_2 = Segment(B_{15}, B_7)
g_2 = Segment(B_{16}, B_8)
h_2 = Segment(B_6, B_{14})
j_2 = Segment(B_{10}, B_2)
k_2 = Segment(B_9, B_1)
l_2 = Segment(B_{11}, B_3)
m_2 = Segment(B_{13}, B_5)
C_2: O + 7 * u - 2 * v + 10 * w
C_1: O + 7 * u + 2 * v + 10 * w
C_3: O + 9 * u + 2 * v + 10 * w
C_4: O + 9 * u - 2 * v + 10 * w
C_5: O + 7 * u + 2 * v + 14 * w
C_6: O + 7 * u - 2 * v + 14 * w
C_8: O + 9 * u - 2 * v + 14 * w
C_7: O + 9 * u + 2 * v + 14 * w
b = Segment(B_2, C_6)
g = Segment(B_2, B_{10})
t = Segment(B_{10}, C_8)
n_2 = Segment(C_8, C_4)
p_2 = Segment(C_6, C_2)
q_2 = Segment(B_9, C_7)
r_2 = Segment(B_1, C_5)
s_2 = Segment(C_7, C_3)
t_2 = Segment(C_5, C_1)
a_3 = Segment(C_6, C_8)
b_3 = Segment(C_7, C_5)
D_1: O + 7 * u + 2 * v
D_2: O + 7 * u - 2 * v
D_4: O + 9 * u - 2 * v
D_3: O + 9 * u + 2 * v
D_5: O + 7 * u + 2 * v - 8 * w
D_6: O + 7 * u - 2 * v - 8 * w
D_7: O + 9 * u + 2 * v - 8 * w
D_8: O + 9 * u - 2 * v - 8 * w
D_9: O + 7 * u - 10 * w
D_{10}: O + 9 * u - 10 * w
c_3 = Segment(D_1, D_5)
d_3 = Segment(D_3, D_7)
e_3 = Segment(D_3, D_1)
f_3 = Segment(D_2, D_4)
g_3 = Segment(D_4, D_8)
h_3 = Segment(D_2, D_6)
i_3 = Segment(D_8, D_6)
j_3 = Segment(D_7, D_5)
k_3 = Segment(D_8, D_{10})
l_3 = Segment(D_{10}, D_7)
m_3 = Segment(D_6, D_9)
n_3 = Segment(D_9, D_5)
p_3 = Segment(D_9, D_{10})
poly1, a_4, a_7, a_{12}, a_6 = Polygon(A_1, A_7, A_{12}, A_6)
poly2, a_5, a_8, a_9, a_{10}, a_{11}, a_{13} = Polygon(A_7, A_8, A_9, A_{10}, A_{11}, A_{12})
poly3, a_{14}, a_{15}, a_{16}, a_{17} = Polygon(A_{12}, A_6, A_5, A_{11})
poly4, a_{18}, a_{19}, a_{20}, a_{21} = Polygon(A_1, A_7, A_8, A_2)
poly5, a_{22}, a_{23}, a_{24}, a_{25} = Polygon(A_2, A_8, A_9, A_3)
poly6, a_{26}, a_{27}, a_{28}, a_{29} = Polygon(A_3, A_9, A_{10}, A_4)
poly8, a_{34}, a_{35}, a_{36}, a_{37}, a_{38}, a_{39} = Polygon(A_2, A_1, A_6, A_5, A_4, A_3)
q_3 = Segment(C_4, C_2)
r_3 = Segment(C_3, C_1)
i_2 = Segment(B_{12}, B_4)
poly9, c_4, c_6, c_8, c_9 = Polygon(C_7, C_3, C_1, C_5)
poly10, c_{10}, c_{11}, c_{12}, c_{13} = Polygon(C_8, C_6, C_2, C_4)
poly12, c_{16}, c_{17}, c_{18}, c_{19} = Polygon(C_7, C_8, C_4, C_3)
s_3 = Segment(C_6, C_5)
t_3 = Segment(C_1, C_2)
poly13, c_{20}, c_{21}, c_{22}, c_{23} = Polygon(C_6, C_5, C_1, C_2)
poly7, d_4, d_5, d_6, d_8 = Polygon(D_4, D_2, D_6, D_8)
poly11, d_7, d_{10}, d_9, d_{11} = Polygon(D_8, D_{10}, D_9, D_6)
poly14, d_{12}, d_{13}, d_{14}, d_{15} = Polygon(D_7, D_5, D_9, D_{10})
poly15, d_{16}, d_{17}, d_{18}, d_{19} = Polygon(D_3, D_1, D_5, D_7)
poly16, d_{20}, d_{21}, d_{22}, d_{23}, d_{24} = Polygon(D_3, D_4, D_8, D_{10}, D_7)
poly17, d_{25}, d_{26}, d_{27}, d_{28}, d_{29} = Polygon(D_2, D_1, D_5, D_9, D_6)
b_4 = Segment(C_7, C_8)
e_4 = Segment(C_3, C_4)
poly18, b_{15}, b_{16}, b_{14}, b_{12}, b_{10}, c_5, c_7, b_9, b_{11}, b_{13} = Polygon(B_{15}, B_{16}, B_{14}, B_{12}, B_{10}, C_8, C_7, B_9, B_{11}, B_{13})
poly19, b_8, b_7, b_5, b_6, b_{17}, c_{14}, c_{15}, b_{18}, b_{19}, b_{20} = Polygon(B_8, B_7, B_5, B_3, B_1, C_5, C_6, B_2, B_4, B_6)
poly20, b_{21}, b_{22}, b_{23}, b_{24} = Polygon(B_{16}, B_8, B_6, B_{14})
poly21, b_{25}, b_{26}, b_{27}, b_{28} = Polygon(B_{14}, B_6, B_4, B_{12})
poly22, b_{29}, b_{30}, b_{31}, b_{32} = Polygon(B_{15}, B_{16}, B_8, B_7)
poly23, b_{33}, b_{34}, b_{35}, b_{36} = Polygon(B_7, B_5, B_{13}, B_{15})
poly24, b_{37}, b_{38}, b_{39}, b_{40} = Polygon(B_{13}, B_5, B_3, B_{11})
poly25, b_{41}, b_{42}, b_{43}, b_{44} = Polygon(B_4, B_{12}, B_{10}, B_2)
poly26, b_{45}, b_{46}, b_{47}, b_{48} = Polygon(B_3, B_{11}, B_9, B_1)
poly27, c_{24}, b_{49}, b_{50}, c_{25} = Polygon(C_5, B_1, B_9, C_7)