Author: 藍邦偉　老師

單位向量

座標軸

Start

x

y

z

$ O $

O = (15.021514405988475, 2.4847137558851307)
β = 1.361356816555577 rad (slider from 0 to 6.283185307179586, step 1*°)
Z_{unit}: O + (0, sin(β))
w = Vector(O, Z_{unit})
α = 3.9636427312791223 rad (slider from 0 to 6.283185307179586, step 0.1*°)
X_{unit}: O + (cos(α), sin(α) * cos(β))
u = Vector(O, X_{unit})
Y_{unit}: O + (-1 * sin(α), cos(α) * cos(β))
v = Vector(O, Y_{unit})
L = 3 (slider from 1 to 10, step 1)
yy = Vector(O - L * v, O + L * v)
zz = Vector(O - L * w, O + L * w)
xx = Vector(O - L * u, O + L * u)
c = false
d = false
Q_2: 0.3 * Corner[2] + 0.7 * Corner[1]
Q_3: (x(Q_2), y(Corner[3]))
g = Segment(Q_2, Q_3)
poly1, h, q_1, q_4, i = Polygon(Corner[1], Q_2, Q_3, Corner[4])
A_2: O - u + v + w
A_3: O - u - v + w
A_4: O + u - v + w
A_1: O + u + v + w
A_5: O + u + v - w
A_6: O - u + v - w
A_7: O - u - v - w
A_8: O + u - v - w
t1 = 1 (slider from 0 to 1, step 0.01)
B_0: O + (5 - 5 * t1) * u
B_1: B_0 + v + w
B_2: B_0 - v + w
B_3: B_0 - v - w
B_4: B_0 + v - w
B_5: B_0 + 0.5 * v
B_6: B_0 - 0.5 * v
a_0 = Segment(A_1, A_2)
a_1 = Segment(A_3, A_2)
a_2 = Segment(A_3, A_4)
a_3 = Segment(A_1, A_4)
a_4 = Segment(A_8, A_4)
a_5 = Segment(A_8, A_5)
a_6 = Segment(A_6, A_5)
a_7 = Segment(A_6, A_7)
a_8 = Segment(A_8, A_7)
a_9 = Segment(A_3, A_7)
a_a = Segment(A_5, A_1)
a_b = Segment(A_6, A_2)
b_1 = Segment(B_1, B_2)
b_2 = Segment(B_3, B_2)
b_3 = Segment(B_3, B_4)
b_4 = Segment(B_1, B_4)
b_5 = Segment(B_1, B_5)
b_6 = Segment(B_4, B_5)
b_7 = Segment(B_6, B_5)
b_8 = Segment(B_6, B_2)
b_9 = Segment(B_6, B_3)
t2 = 1 (slider from 0 to 1, step 0.01)
C_0: O + (5 - 5 * t2) * v
C_2: C_0 - u + v - w
C_4: C_0 + u - v + w
C_1: C_0 - u - v + w
C_3: C_0 + u + v - w
d_1 = Segment(C_1, C_2)
d_2 = Segment(C_3, C_2)
d_3 = Segment(C_3, C_4)
d_4 = Segment(C_1, C_4)
C_6: C_0 + (2 + sqrt(6)) / 2 * v - (2 + sqrt(6)) / 2 * w
G_1: O - (1 + sqrt(6) / 6) * v + (1 + sqrt(6) / 6) * w + (5 - 5 * t2) * v
c_1 = CurveCartesian(x(G_1 + (-cos(t) + 1 / sqrt(3) * sin(t)) * u + (1 / sqrt(6) * cos(t) + 1 / sqrt(2) * sin(t)) * v - (1 / sqrt(6) * cos(t) + 1 / sqrt(2) * sin(t)) * w), y(G_1 + (-cos(t) + 1 / sqrt(3) * sin(t)) * u + (1 / sqrt(6) * cos(t) + 1 / sqrt(2) * sin(t)) * v - (1 / sqrt(6) * cos(t) + 1 / sqrt(2) * sin(t)) * w), t, 0, 6.283185307179586)
C_5: O - (2 + sqrt(6)) / 2 * v + (2 + sqrt(6)) / 2 * w + (5 - 5 * t2) * v
G_2: O + (1 + sqrt(6) / 6) * v - (1 + sqrt(6) / 6) * w + (5 - 5 * t2) * v
c_2 = CurveCartesian(x(G_2 + (-cos(t) + 1 / sqrt(3) * sin(t)) * u + (1 / sqrt(6) * cos(t) + 1 / sqrt(2) * sin(t)) * v - (1 / sqrt(6) * cos(t) + 1 / sqrt(2) * sin(t)) * w), y(G_2 + (-cos(t) + 1 / sqrt(3) * sin(t)) * u + (1 / sqrt(6) * cos(t) + 1 / sqrt(2) * sin(t)) * v - (1 / sqrt(6) * cos(t) + 1 / sqrt(2) * sin(t)) * w), t, 0, 6.28319)
a = Segment(G_1, G_2)
D_2, C_8 = Intersect(a, c_2)
C_7, D_3 = Intersect(a, c_1)
s_1 = Segment(C_1, C_7)
s_2 = Segment(C_4, C_7)
s_3 = Segment(C_8, C_7)
s_4 = Segment(C_8, C_2)
s_5 = Segment(C_8, C_3)