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

(0,0,0)

3D 座標架的製作

單位向量

單位點

座標軸

xy平面

顯示作法

x

y

z

(5,5,0)

(5,5,5)

(5,0,0)

(0,5,0)

(0,0,5)

(0,5,5)

正立方體

α = 5.736897251305361 rad (slider from 0 to 6.283185307179586, step 0.1*°)
β = 4.0125119503349636 rad (slider from 0 to 6.283185307179586, step 0.1*°)
L = 4 (slider from 1 to 10, step 1)
O = (25.204212958650142, 14.297703549997618)
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)
h = false
i = false
j = false
k = false
l = true
A_1: O + 5 * u + 5 * w
A_2: O + 5 * u + 5 * v
A_3: O + 5 * u + 5 * v + 5 * w
a = Segment(A_2, A_3)
b = Segment(A_1, A_3)
A_4: O + 5 * u
A_5: O + 5 * v
A_6: O + 5 * w
A_7: O + 5 * v + 5 * w
c = Segment(A_7, A_3)
m = Segment(A_7, A_6)
p = Segment(A_6, A_1)
q = Segment(A_1, A_4)
r = Segment(A_2, A_4)
s = Segment(A_2, A_5)
t = Segment(A_5, A_7)
a_1 = Segment(A_6, O)
b_1 = Segment(A_5, O)
c_1 = Segment(O, A_4)
poly1, a_7, a_3, a_2, a_5 = Polygon(A_7, A_3, A_2, A_5)
poly2, a_4, a_6, a_8, a_9 = Polygon(A_3, A_1, A_4, A_2)
poly3, a_{10}, o, a_{11}, a_{12} = Polygon(A_6, O, A_4, A_1)
poly4, a_{13}, a_{14}, o_1, a_{15} = Polygon(A_7, A_6, O, A_5)
poly5, a_{16}, a_{17}, a_{18}, a_{19} = Polygon(A_7, A_6, A_1, A_3)
poly6, a_{20}, o_2, a_{21}, a_{22} = Polygon(A_5, O, A_4, A_2)