三垂線定理
Author: 藍邦偉  老師

拉動n，F,G兩點觀察。當n=2時，再拉動t_1,t_2,t_3。最後拉到n=3。

x

y

z

顯示xy平面

顯示單位向量

顯示座標軸

三垂線定理

O = (-0.2648420208397521, -1.2168818982377012)
A: (x((Corner[3.0] + 39.0 * Corner[4.0]) / 40.0), y((Corner[1.0] + 9.0 * Corner[4.0]) / 10.0))
B: (x((4.0 * Corner[3.0] + 16.0 * Corner[4.0]) / 20.0), y((Corner[1.0] + 9.0 * Corner[4.0]) / 10.0))
D: (3.0 * B + A) / 4.0
a = Segment(A, B)
E = Point(a)
C: (3.0 * A + B) / 4.0
E' = Rotate(Translate[E, Vector[C, D]], 90.0*°, D)
c = Circle(C, E)
c' = Translate(c, Vector[Vector[C, D]])
G = Point(c')
c'' = Rotate(c', 270.0*°, C)
F = Point(c'')
A' = Rotate(A, 270.0*°, C)
B' = Rotate(B, 270.0*°, C)
a' = Segment(A', B')
D' = Rotate(D, 270.0*°, C)
b = Segment(D', F)
E'' = Rotate(E', 270.0*°, C)
α = Angle(E'', D', F)
d = Segment(D, G)
β = Angle(G, D, E')
K: C + (0.0, b * cos(β))
K' = Translate(K, Vector[Vector[C, O]])
w = Vector(O, K')
J: C + (b * cos(α + 90.0°), b * sin(α + 90.0°) * sin(β))
J' = Translate(J, Vector[Vector[C, O]])
v = Vector(O, J')
I: C + (b * cos(α), b * sin(α) * sin(β))
I' = Translate(I, Vector[Vector[C, O]])
u = Vector(O, I')
A_2: O + 5.0 * u + 4.0 * v - 2.0 * w
A_1: O + 5.0 * u + 4.0 * v + 2.0 * w
W = Dilate(A_2, 2.0, A_1)
A_4: O - 6.0 * u + 4.0 * v + 2.0 * w
Z = Dilate(A_4, 2.0, A_1)
A_3: O + 5.0 * u - 4.0 * v + 2.0 * w
N = Dilate(A_3, 2.0, A_1)
e = Segment(C, K)
f = Segment(C, I)
g = Segment(C, J)
L = 6 (slider from 1 to 10, step 1)
I'' = Dilate(I', L, O)
J'' = Dilate(J', L, O)
K'' = Dilate(K', L, O)
I''' = Dilate(I'', -1.0, O)
J''' = Dilate(J'', -1.0, O)
K''' = Dilate(K'', -1.0, O)
u' = Vector(I''', I'')
v' = Vector(J''', J'')
w' = Vector(K''', K'')
h = Segment(D', E'')
i = Segment(D, E')
軌跡1 = Locus(I, F)
L_{axis}: L
j = false
k = false
list1 = Sequence(CurveCartesian[x(O + t * u + s * v), y(O + t * u + s * v), t, -(L), L], s, -(L), L, 1.0)
list2 = Sequence(CurveCartesian[x(O + t * u + s * v), y(O + t * u + s * v), s, -(L), L], t, -(L), L, 1.0)
A_6: O + 5.0 * u - 4.0 * v - 2.0 * w
A_7: O - 6.0 * u + 4.0 * v - 2.0 * w
A_8: O - 6.0 * u - 4.0 * v - 2.0 * w
A_5: O - 6.0 * u - 4.0 * v + 2.0 * w
m = Segment(A_3, A_1)
n_1 = Segment(A_1, A_4)
p = Segment(A_4, A_5)
q = Segment(A_5, A_3)
r = Segment(A_3, A_6)
s = Segment(A_6, A_2)
t = Segment(A_2, A_1)
a_1 = Segment(A_4, A_7)
b_1 = Segment(A_7, A_2)
c_1 = Segment(A_6, A_8)
d_1 = Segment(A_8, A_5)
e_1 = Segment(A_8, A_7)
l = false
n_2 = Line(A_1, A_2)
f_1 = Line(A_1, A_4)
g_2 = Line(A_3, A_1)
C_a: C + (b * cos(α + 190.0°), b * sin(α + 190.0°) * sin(β))
C_b: C + (b * cos(α + 10.0°), b * sin(α + 10.0°) * sin(β))
C_c: C + (b * cos(α + 210.0°), b * sin(α + 210.0°) * sin(β))
C_d: C + (b * cos(α + 200.0°), b * sin(α + 200.0°) * sin(β))
C_e: C + (b * cos(α + 320.0°), b * sin(α + 320.0°) * sin(β))
k_1 = Conic(C_a, C_b, C_c, C_d, C_e)
t_1 = 0 (slider from 0 to 1, step 0.01)
P_a: A_4 + t_1 * Vector[A_4, A_7]
g_1 = Segment(A_4, P_a)
t_2 = 0 (slider from 0 to 1, step 0.01)
P_b: A_7 + t_2 * Vector[A_7, A_2]
h_1 = Segment(A_7, P_b)
t_3 = 0 (slider from 0 to 1, step 0.01)
多邊形1, l_1, m_1, p_1, q_1 = Polygon(A_2, A_6, A_8, A_7)
i_1 = Segment(A_2, A_6)
P_c: A_4 + t_3 * Vector[A_4, A_2]
j_1 = Segment(A_4, P_c)
n = 0 (slider from 0 to 3, step 1)
α_1 = Angle(A_7, A_2, A_1)
α_2 = Angle(A_8, A_7, A_4)
α_3 = Angle(A_6, A_8, A_5)
α_4 = Angle(A_2, A_6, A_3)
α_5 = Angle(A_3, A_5, A_4)
α_6 = Angle(A_8, A_6, A_2)
r_1 = Circle(P_a, 0.4)
M = Intersect(b_1, h_1)
P, T = Intersect(r_1, q_1)
H = Intersect(a_1, g_1)
Q = Intersect(r_1, g_1)
R_a: P + Q - A_7
s_1 = Segment(P, R_a)
a_2 = Segment(Q, R_a)
c_2 = Circle(P_b, 0.4)
d_2 = Circle(A_2, 0.4)
R = Intersect(d_2, b_1)
S = Intersect(d_2, s)
Q_b: S + R - A_2
b_2 = Segment(Q_b, R)
e_2 = Segment(Q_b, S)
U, V = Intersect(c_2, j_1)
Q_c: S + U - A_2
f_2 = Segment(Q_c, S)
h_2 = Segment(Q_c, U)
B_1 = Mirror(A_8, P_a)
C_1 = Mirror(A_6, A_2)
多邊形2, a_6, c_3, b_3, a_8 = Polygon(A_6, C_1, B_1, A_8)
i_2 = Segment(A_6, C_1)