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

五角錐

單位向量

單位點

座標軸

xy平面

x

y

z

α = 4.965461721923868 rad (slider from 0 to 6.283185307179586, step 0.1*°)
β = 4.4505895925855405 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
L = 7 (slider from 1 to 10, step 1)
O = (38.28, 10.34)
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)
A = (20.64, 16.56)
h = false
i = false
j = false
k = false
A_1: O + 2 * cos(0°) * u + 2 * sin(0°) * v
A_2: O + 2 * cos(72°) * u + 2 * sin(72°) * v
A_3: O + 2 * cos(144°) * u + 2 * sin(144°) * v
A_4: O + 2 * cos(216°) * u + 2 * sin(216°) * v
A_5: O + 2 * cos(288°) * u + 2 * sin(288°) * v
poly1, a_5, a_4, a_3, a_2, a_1 = Polygon(A_5, A_4, A_3, A_2, A_1)
H: O + 6 * w
poly2, a_6, h_1, a_7 = Polygon(H, A_5, A_4)
poly3, a_8, h_2, a_9 = Polygon(H, A_4, A_3)
poly4, a_{10}, h_3, a_{11} = Polygon(H, A_3, A_2)
poly5, a_{12}, h_4, a_{13} = Polygon(H, A_2, A_1)
poly6, a_{14}, h_5, a_{15} = Polygon(H, A_1, A_5)