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

鑽石

單位向量

單位點

座標軸

xy平面

顯示作法

x

y

z

α = 3.4557519189487724 rad (slider from 0 to 6.283185307179586, step 0.1*°)
β = 4.989896331451789 rad (slider from 0 to 6.283185307179586, step 0.1*°)
L = 6 (slider from 1 to 10, step 1)
O = (29.8, 12.84)
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
l = true
A_1: O + 2 * u - v + 4 * w
A_2: O + 2 * u + v + 4 * w
A_3: O - 2 * u + v + 4 * w
A_5: O + u + 2 * v + 4 * w
A_6: O + u - 2 * v + 4 * w
A_7: O - u - 2 * v + 4 * w
A_8: O - u + 2 * v + 4 * w
A_4: O - 2 * u - v + 4 * w
poly1, a_6, a_1, a_2, a_5, a_8, a_3, a_4, a_7 = Polygon(A_6, A_1, A_2, A_5, A_8, A_3, A_4, A_7)
A_17: O + 2 * u + 4 * v + 3 * w
A_18: O + 2 * u - 4 * v + 3 * w
A_19: O - 2 * u + 4 * v + 3 * w
A_20: O - 2 * u - 4 * v + 3 * w
A_15: O - 4 * u - 2 * v + 3 * w
A_16: O - 4 * u + 2 * v + 3 * w
A_13: O + 4 * u + 2 * v + 3 * w
A_14: O + 4 * u - 2 * v + 3 * w
poly2, a_9, a_13, a_17, a_{10} = Polygon(A_2, A_13, A_17, A_5)
poly3, a_{11}, a_19, a_{12}, a_{13} = Polygon(A_8, A_19, A_17, A_5)
poly4, a_{14}, a_{15}, a_{16}, a_16 = Polygon(A_3, A_8, A_19, A_16)
poly5, a_{17}, a_{18}, a_{19}, a_15 = Polygon(A_4, A_3, A_16, A_15)
poly6, a_20, a_{20}, a_{21}, a_{22} = Polygon(A_20, A_7, A_4, A_15)
poly7, a_18, a_{23}, a_{24}, a_{25} = Polygon(A_18, A_6, A_7, A_20)
poly8, a_14, a_{26}, a_{27}, a_{28} = Polygon(A_14, A_1, A_6, A_18)
poly9, a_{29}, a_{30}, a_{31}, a_{32} = Polygon(A_13, A_2, A_1, A_14)
poly10, o, a_{33}, a_{34} = Polygon(A_19, A_17, O)
poly11, o_1, a_{35}, a_{36} = Polygon(A_16, A_19, O)
poly12, o_2, a_{37}, a_{38} = Polygon(A_15, A_16, O)
poly13, a_{39}, a_{40}, o_3 = Polygon(A_13, O, A_17)
poly14, a_{41}, a_{42}, o_4 = Polygon(A_14, O, A_13)
poly15, a_{43}, a_{44}, o_5 = Polygon(A_18, O, A_14)
poly16, a_{45}, a_{46}, o_6 = Polygon(A_20, O, A_18)
poly17, a_{47}, a_{48}, o_7 = Polygon(A_15, O, A_20)
poly18, a_{49}, a_{50}, a_{51}, a_{52} = Polygon(A_4, A_15, A_20, A_7)
poly19, a_{53}, a_{54}, a_{55}, a_{56} = Polygon(A_17, A_13, A_2, A_5)
poly20, o_8, a_{57}, a_{58} = Polygon(A_18, A_20, O)
poly21, a_{59}, a_{60}, o_9 = Polygon(A_20, O, A_15)
poly22, a_{61}, a_{62}, o_{10} = Polygon(A_15, O, A_16)
poly23, a_{63}, a_{64}, o_{11} = Polygon(A_16, O, A_19)
poly24, a_{65}, a_{66}, o_{12} = Polygon(A_19, O, A_17)
poly25, a_{67}, a_{68}, o_{13} = Polygon(A_13, O, A_17)
poly26, a_{69}, a_{70}, o_{14} = Polygon(A_13, O, A_14)
poly27, a_{71}, a_{72}, o_{15} = Polygon(A_14, O, A_18)