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

3D 座標架的製作

單位向量

單位點

座標軸

xy平面

x

y

z

LoveHeart

α = 4.783598413866058 rad (slider from 0 to 6.283185307179586, step 0.01*°)
β = 4.363323129985824 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
L = 4 (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)
n = 9 (slider from 0 to 18, step 1)
h = false
i = false
j = false
k = false
A: O - 2 * w
D: O - v
E: O + v
B: O + 2 * u
C: O - 2 * u
H = Point(z_{Axis})
poly1, d_1, h_1, c = Polygon(H, C, D)
poly2, h_2, c_1, e_1 = Polygon(C, E, H)
poly4, e_3, b, h_3 = Polygon(B, H, E)
poly3, b_1, d_2, h_4 = Polygon(D, H, B)
F: O + u + w
G: O - u + w
poly5, d_3, f_1, b_2 = Polygon(F, B, D)
poly6, e_2, f_2, b_3 = Polygon(F, B, E)
poly7, f_3, e_4, d_4 = Polygon(E, D, F)
poly8, e_5, g_1, d_5 = Polygon(G, D, E)
poly9, c_2, g_2, d_6 = Polygon(G, D, C)
poly10, c_3, g_3, e_6 = Polygon(G, E, C)