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

(0,0,0)

3D 座標架的製作

單位向量

單位點

座標軸

xy平面

顯示作法

x

y

z

3D座標正方體的分解

n = 5.6 (slider from 0 to 10, step 0.1)
O = (25.204212958650142, 14.297703549997618)
β = 4.625122517784973 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
Z_{unit}: O + (0, -sin(β))
w = Vector(O, Z_{unit})
α = 5.235987755982989 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
Y_{unit}: O + (-sin(α), cos(α) * cos(β))
v = Vector(O, Y_{unit})
X_{unit}: O + (cos(α), sin(α) * cos(β))
u = Vector(O, X_{unit})
L = 10 (slider from 1 to 10, step 1)
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
o = 0 (slider from 0 to 10, step 0.1)
A: O - n * u - n * v - n * w - o * v
A_1: O + n * u - n * v - n * w - o * v
A_2: O + n * u + n * v - n * w + o * v
A_3: O - n * u + n * v - n * w + o * v
A_4: O - n * u - n * v + n * w - o * v
A_5: O + n * u - n * v + n * w - o * v
A_6: O + n * u + n * v + n * w + o * v
A_7: O - n * u + n * v + n * w + o * v
b = Segment(A_4, A_5)
m = Segment(A_6, A_7)
p = Segment(A_2, A_3)
q = Segment(A_3, A_7)
r = Segment(A_6, A_2)
s = Segment(A_5, A_1)
t = Segment(A_4, A)
c_1 = Segment(A_1, A)
B_1: O - n * u - n * w - o * v
B_2: O + n * u - n * w - o * v
B_3: O + n * u + n * w - o * v
B_4: O - n * u + n * w - o * v
B_5: O - n * u - n * w + o * v
B_6: O + n * u - n * w + o * v
B_7: O + n * u + n * w + o * v
B_8: O - n * u + n * w + o * v
a = Segment(A_7, B_8)
c = Segment(A_6, B_7)
a_1 = Segment(A_2, B_6)
b_1 = Segment(A_3, B_5)
d_1 = Segment(B_4, A_4)
e_1 = Segment(B_3, A_5)
f_1 = Segment(B_1, A)
g_1 = Segment(B_2, A_1)
h_1 = Segment(B_7, B_8)
i_1 = Segment(B_8, B_5)
j_1 = Segment(B_5, B_6)
k_1 = Segment(B_6, B_7)
l_1 = Segment(B_4, B_3)
m_1 = Segment(B_3, B_2)
n_1 = Segment(B_2, B_1)
p_1 = Segment(B_1, B_4)
poly1, a_6, b_7, b_6, a_2 = Polygon(A_6, B_7, B_6, A_2)
poly2, a_3, a_7, b_8, b_2 = Polygon(A_6, A_7, B_8, B_7)
poly3, b_3, b_4, b_5, b_9 = Polygon(B_7, B_8, B_5, B_6)
poly4, b_{10}, a_4, a_5, b_{11} = Polygon(B_4, A_4, A_5, B_3)
poly5, b_{12}, b_{13}, b_{14}, b_{15} = Polygon(B_4, B_1, B_2, B_3)
poly6, a_8, a_9, a_{10}, a_{11} = Polygon(A_4, A, A_1, A_5)
poly7, a_{12}, b_{16}, b_{17}, a_{13} = Polygon(A_5, B_3, B_2, A_1)
poly8, b_{18}, b_{19}, a_{14}, a_{15} = Polygon(B_4, B_1, A, A_4)
poly9, a_{16}, a_{17}, b_{20}, b_{21} = Polygon(A, A_1, B_2, B_1)
poly10, b_{22}, a_{18}, a_{19}, b_{23} = Polygon(B_6, A_2, A_3, B_5)
poly11, b_{24}, b_{25}, b_{26}, b_{27} = Polygon(B_7, B_8, B_5, B_6)
poly12, a_{20}, a_{21}, a_{22}, a_{23} = Polygon(A_7, A_3, A_2, A_6)
poly13, a_{24}, b_{28}, b_{29}, a_{25} = Polygon(A_7, B_8, B_5, A_3)