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

單位向量

單位點

座標軸

xy平面

x

y

z

(2,-3,4)

(2,-3,0)

(2,3,0)

(-2,3,0)

(-2,-3,0)

(2,3,4)

(-2,3,4)

(-2,-3,4)

長方柱

α = 3.1852258848896517 rad (slider from 0 to 6.283185307179586, step 0.01*°)
β = 4.625122517784973 rad (slider from 0 to 6.283185307179586, step 0.01*°)
L = NaN (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_1 = 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_1, O + L * w_1)
多邊形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_1 = false
i = false
j = false
k = false
A_1: O + 2 * u - 3 * v + 4 * w_1
A_2: O + 2 * u - 3 * v
a = Segment(A_1, A_2)
A_3: O + 2 * u + 3 * v
b = Segment(A_2, A_3)
A_4: O - 2 * u + 3 * v
c = Segment(A_3, A_4)
A_5: O - 2 * u - 3 * v
m = Segment(A_4, A_5)
p = Segment(A_5, A_2)
A_6: O + 2 * u + 3 * v + 4 * w_1
q = Segment(A_1, A_6)
r_1 = Segment(A_6, A_3)
A_7: O - 2 * u + 3 * v + 4 * w_1
s_1 = Segment(A_6, A_7)
t = Segment(A_7, A_4)
A_8: O - 2 * u - 3 * v + 4 * w_1
a_1 = Segment(A_8, A_7)
b_1 = Segment(A_8, A_5)
c_1 = Segment(A_8, A_1)
poly1, a_6, a_2, a_8, a_7 = Polygon(A_6, A_1, A_8, A_7)
poly2, a_3, a_4, a_5, a_9 = Polygon(A_6, A_1, A_2, A_3)
poly3, a_{10}, a_{11}, a_{12}, a_{13} = Polygon(A_1, A_8, A_5, A_2)
poly4, a_{14}, a_{15}, a_{16}, a_{17} = Polygon(A_8, A_7, A_4, A_5)
poly5, a_{18}, a_{19}, a_{20}, a_{21} = Polygon(A_7, A_6, A_3, A_4)
poly6, a_{22}, a_{23}, a_{24}, a_{25} = Polygon(A_5, A_4, A_3, A_2)