極值的應用(1)
Author: 藍邦偉　老師

單位向量

座標軸

x

y

z

極值的應用(1)

O = (6.787407780821677, 1.6243274194673818)
β = 1.3962634015954636 rad (slider from 0 to 6.283185307179586, step 0.1*°)
Z_{unit}: O + (0, sin(β))
k = Vector(O, Z_{unit})
α = 4.276056667386108 rad (slider from 0 to 6.283185307179586, step 0.1*°)
X_{unit}: O + (cos(α), sin(α) * cos(β))
i = Vector(O, X_{unit})
Y_{unit}: O + (-1 * sin(α), cos(α) * cos(β))
j = Vector(O, Y_{unit})
L = 7 (slider from 1 to 10, step 1)
a = Vector(O - L * j, O + L * j)
b = Vector(O - L * k, O + L * k)
z = Vector(O - L * i, O + L * i)
c = false
d = false
Q_2: 0.55 * Corner[2] + 0.45 * Corner[1]
Q_3: (x(Q_2), y(Corner[3]))
g = Segment(Q_2, Q_3)
poly1, h_1, q_1, q_4, i_1 = Polygon(Corner[1], Q_2, Q_3, Corner[4])
w = 3.8 (slider from 1 to l, step 0.1)
l = 5 (slider from 1 to 5, step 0.1)
h = 0.6 (slider from 0.1 to w / 2 - 0.1, step 0.1)
A = (13.051896724347223, 3.8176496874643333)
P_1: A + (w / 2, l / 2)
P_2: A + ((-w) / 2, l / 2)
P_3: A + ((-w) / 2, (-l) / 2)
P_4: A + (w / 2, (-l) / 2)
P_5: A + (w / 2 - h, l / 2 - h)
P_6: A + ((-w) / 2 + h, l / 2 - h)
P_7: A + ((-w) / 2 + h, (-l) / 2 + h)
P_8: A + (w / 2 - h, (-l) / 2 + h)
a_2 = Segment(P_1, P_2)
a_3 = Segment(P_3, P_2)
a_1 = Segment(P_3, P_4)
a_4 = Segment(P_4, P_1)
a_5 = Segment(P_5, P_6)
a_8 = Segment(P_7, P_6)
a_7 = Segment(P_7, P_8)
a_6 = Segment(P_5, P_8)
poly2, p_1, r, p_5, s = Polygon(P_1, (x(P_5), y(P_1)), P_5, (x(P_1), y(P_5)))
poly3, p_8, t, p_4, a_9 = Polygon(P_8, (x(P_8), y(P_4)), P_4, (x(P_4), y(P_8)))
poly5, p_3, d_1, p_7, e_1 = Polygon(P_3, (x(P_3), y(P_7)), P_7, (x(P_7), y(P_3)))
S_1: O + (w / 2 - h) * i + (l / 2 - h) * j
S_2: O + ((-w) / 2 + h) * i + (l / 2 - h) * j
S_3: O + ((-w) / 2 + h) * i + ((-l) / 2 + h) * j
S_4: O + (w / 2 - h) * i + ((-l) / 2 + h) * j
S_5: S_1 + h * k
S_6: S_2 + h * k
S_7: S_3 + h * k
S_8: S_4 + h * k
poly4, p_2, e, p_6, f = Polygon(P_2, (x(P_2), y(P_6)), P_6, (x(P_6), y(P_2)))
b_1, b_2 = SDLine(S_5, S_1, S_8, S_6)
b_3, b_4 = SDLine(S_6, S_2, S_5, S_7)
b_5, b_6 = SDLine(S_7, S_3, S_6, S_8)
b_7, b_8 = SDLine(S_8, S_4, S_7, S_5)
b_9, b_{10} = SDLine(S_8, S_5, S_4, S_7)
b_{11}, b_{12} = SDLine(S_7, S_8, S_3, S_6)
b_{13}, b_{14} = SDLine(S_5, S_6, S_1, S_8)
b_{15}, b_{16} = SDLine(S_6, S_7, S_2, S_5)
b_{17}, b_{18} = SDLine(S_2, S_3, S_1, S_6)
b_{19}, b_{20} = SDLine(S_1, S_2, S_4, S_5)
b_{21}, b_{22} = SDLine(S_4, S_1, S_3, S_8)
b_{23}, b_{24} = SDLine(S_3, S_4, S_2, S_7)
t1 = Min(h / 2, w / 2)
t2 = Min(h / 2, l / 2)
t3 = Min(t1, t2)
poly6, s_1, s_2, s_3, s_4 = Polygon(S_1, S_2, S_3, S_4)

Tool: SDLine
Input: A, B, C, D
Output: g, h

b: sgn(sin(Angle[D, B, A]))
a: sgn(sin(Angle[A, B, C]))
c: sgn(a + b + 0.5)
d: sqrt(c)
e: sqrt(-c)
E = Midpoint(A, B)
A' = Dilate(A, d, E)
B' = Dilate(B, d, E)
g = Segment(A', B')
A'_1 = Dilate(A, e, E)
B'_1 = Dilate(B, e, E)
h = Segment(A'_1, B'_1)