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

正八面體

單位向量

單位點

座標軸

xy平面

x

y

z

α = 3.1381019950858047 rad (slider from 0 to 6.283185307179586, step 0.1*°)
β = 4.754276882432554 rad (slider from 0 to 6.283185307179586, step 0.1*°)
L = 4 (slider from 1 to 10, step 1)
O = (34.405902907413406, 8.656341241349118)
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
A_6: O - 4 * u + 4 * v + 0 * w
A_7: O - 4 * u - 4 * v + 0 * w
A_3: O + 4 * u - 4 * v + 0 * w
A_0: O + 4 * u + 4 * v + 0 * w
A_5: O + 0
poly1, a_7, a_6, a_0, a_3 = Polygon(A_7, A_6, A_0, A_3)
A_8: O + 0 * u + 0 * v + 5 * w
A_1: O + 0 * u + 0 * v - 5 * w
a = Segment(A_1, A_7)
b = Segment(A_1, A_0)
c = Segment(A_1, A_6)
m = Segment(A_1, A_3)
n = Segment(A_0, A_8)
p = Segment(A_7, A_8)
q = Segment(A_6, A_8)
r = Segment(A_8, A_3)
poly2, a_1, a_8, a_2 = Polygon(A_8, A_7, A_6)
poly3, a_4, a_5, a_9 = Polygon(A_8, A_0, A_3)
poly4, a_{10}, a_{11}, a_{12} = Polygon(A_8, A_3, A_7)
poly5, a_{13}, a_{14}, a_{15} = Polygon(A_8, A_6, A_0)
poly6, a_{16}, a_{17}, a_{18} = Polygon(A_1, A_7, A_6)
poly7, a_{19}, a_{20}, a_{21} = Polygon(A_1, A_0, A_6)
poly8, a_{22}, a_{23}, a_{24} = Polygon(A_1, A_3, A_7)
poly9, a_{25}, a_{26}, a_{27} = Polygon(A_1, A_0, A_3)