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

3D 座標架的製作

單位向量

單位點

座標軸

xy平面

x

y

z

Pentagonal Trapezohedron

α = 0.5906194188748811 rad (slider from 0 to 6.283185307179586, step 0.01*°)
β = 4.71238898038469 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
L = 1 (slider from 1 to 10, step 1)
O = (29.8, 12.78)
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_2: O + 2 * cos(72°) * u + 2 * sin(72°) * v + w
A_1: O + 2 * cos(0°) * u + 2 * sin(0°) * v + w
A_3: O + 2 * cos(144°) * u + 2 * sin(144°) * v + w
A_4: O + 2 * cos(216°) * u + 2 * sin(216°) * v + w
A_5: O + 2 * cos(288°) * u + 2 * sin(288°) * v + w
B_1: O + 2 * cos(36°) * u + 2 * sin(36°) * v - w
B_2: O + 2 * cos(108°) * u + 2 * sin(108°) * v - w
B_3: O + 2 * cos(180°) * u + 2 * sin(180°) * v - w
B_4: O + 2 * cos(252°) * u + 2 * sin(252°) * v - w
B_5: O + 2 * cos((-36)°) * u + 2 * sin((-36)°) * v - w
a = Segment(A_1, B_1)
b = Segment(B_1, A_2)
c = Segment(A_2, B_2)
l = Segment(B_2, A_3)
m = Segment(A_3, B_3)
n = Segment(B_3, A_4)
p = Segment(A_4, B_4)
q = Segment(B_4, A_5)
r = Segment(A_5, B_5)
s = Segment(B_5, A_1)
C_1: O + 5 * w
t = Segment(C_1, A_1)
a_1 = Segment(C_1, A_5)
b_1 = Segment(C_1, A_4)
c_1 = Segment(C_1, A_3)
d_1 = Segment(C_1, A_2)
C_2: O - 5 * w
e_1 = Segment(B_1, C_2)
f_1 = Segment(C_2, B_5)
g_1 = Segment(B_2, C_2)
h_1 = Segment(B_4, C_2)
i_1 = Segment(B_3, C_2)
poly1, c_2, a_5, b_5, a_2 = Polygon(C_1, A_5, B_5, A_1)
poly2, b_2, c_3, b_3, a_3 = Polygon(B_5, C_2, B_1, A_1)
poly3, a_4, b_4, c_4, b_6 = Polygon(A_5, B_4, C_2, B_5)
poly4, c_5, a_6, b_7, a_7 = Polygon(C_1, A_1, B_1, A_2)
poly5, c_6, a_8, b_8, a_9 = Polygon(C_1, A_2, B_2, A_3)
poly6, b_9, c_7, b_{10}, a_{10} = Polygon(B_1, C_2, B_2, A_2)
poly7, a_{11}, b_{11}, c_8, b_{12} = Polygon(A_3, B_2, C_2, B_3)
poly8, c_9, a_{12}, b_{13}, a_{13} = Polygon(C_1, A_5, B_4, A_4)
poly9, a_{14}, b_{14}, c_{10}, b_{15} = Polygon(A_4, B_4, C_2, B_3)
poly10, c_{11}, a_{15}, b_{16}, a_{16} = Polygon(C_1, A_4, B_3, A_3)