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

三角雙錐

單位向量

單位點

座標軸

xy平面

x

y

z

α = 2.6214845364954833 rad (slider from 0 to 6.283185307179586, step 0.01*°)
β = 4.694935687864747 rad (slider from 0 to 6.283185307179586, step 0.1*°)
L = 4 (slider from 1 to 10, step 1)
O = (36.5752374857039, 13.00776310850263)
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)
A = (20.64, 16.56)
h = false
i = false
j = false
k = false
a = 2.84 (slider from 1 to 5, step 0.01)
b = 1 (slider from 1 to 5, step 0.01)
c = 1 (slider from 1 to 5, step 0.01)
A_1: O + a * cos(0°) * u + a * sin(0°) * v
A_2: O + a * cos(120°) * u + a * sin(120°) * v
A_3: O + a * cos(240°) * u + a * sin(240°) * v
B_1: O + 2 * b * w
B_2: O - 2 * b * w
m = Segment(A_3, A_1)
p = Segment(A_1, A_2)
q = Segment(A_2, A_3)
r = Segment(B_1, A_3)
s = Segment(B_1, A_2)
t = Segment(B_1, B_2)
a_1 = Segment(B_1, A_1)
b_1 = Segment(A_1, B_2)
c_1 = Segment(B_2, A_2)
d_1 = Segment(B_2, A_3)
poly1, a_2, a_3, b_2 = Polygon(A_1, B_2, A_2)
poly2, a_4, a_5, b_3 = Polygon(A_2, B_2, A_3)
poly3, e_1, f_1, g_1 = Polygon(A_3, B_2, A_1)
poly4, b_4, a_6, a_7 = Polygon(A_1, A_2, B_1)
poly5, b_5, a_8, a_9 = Polygon(A_2, A_3, B_1)
poly6, b_6, a_{10}, a_{11} = Polygon(A_3, A_1, B_1)