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

長方體

單位向量

單位點

座標軸

xy平面

顯示作法

x

y

A(2.-3.4)

B(2.-3.0)

C(2.3.0)

D(2.3.4)

E(-2.3.4)

G(-2.-3.0)

F(-2.-3.4)

H(-2.3.0)

z

α = 3.839724354387525 rad (slider from 0 to 6.283185307179586, step 0.1*°)
β = 3.454006589696778 rad (slider from 0 to 6.283185307179586, step 0.1*°)
L = 7 (slider from 1 to 10, step 1)
O = (36.20135537190084, 8.719520661157038)
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)
A = (20.64, 16.56)
h_1 = false
i = false
j = false
k_1 = false
l = true
A_1: O + 2 * u - 3 * v + 4 * w
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 + 4 * w
c = Segment(A_3, A_4)
m = Segment(A_1, A_4)
A_5: O - 2 * u + 3 * v + 4 * w
n = Segment(A_4, A_5)
A_7: O - 2 * u - 3 * v
A_6: O - 2 * u - 3 * v + 4 * w
p = Segment(A_5, A_6)
q = Segment(A_6, A_7)
r_1 = Segment(A_1, A_6)
s = Segment(A_2, A_7)
A_8: O - 2 * u + 3 * v
t = Segment(A_3, A_8)
a_1 = Segment(A_5, A_8)
b_1 = Segment(A_7, A_8)
poly3, a_{10}, a_{11}, a_{12}, a_{13} = Polygon(A_1, A_2, A_3, A_4)
poly5, a_{18}, a_{19}, a_{20}, a_{21} = Polygon(A_6, A_7, A_2, A_1)
poly4, a_{14}, a_{15}, a_{16}, a_{17} = Polygon(A_4, A_5, A_8, A_3)
A_9 = Point(q)
E = Intersect(a_{17}, a_{16})
poly1, a_5, a_4, a_2, a_6 = Polygon(A_5, A_4, A_1, A_6)
poly8, a_{30}, a_{31}, b_2, a_{32} = Polygon(A_3, A_8, A_9, A_2)
z_{Axis} = Vector(O + L * w, O - L * w)
poly2, a_9, a_3, a_7, a_8 = Polygon(A_9, A_6, A_5, A_8)