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

x

y

z

單位向量

座標軸

Reset

Step 1

Step 2

Step 3

三垂線定理

α = 0.6108652381980153 rad (slider from 0 to 6.283185307179586, step 0.01*°)
β = 1.3089969389957472 rad (slider from 0 to 6.283185307179586, step 0.017)
O = (8.928096116804236, 5.393313825657669)
X_{unit}: O + (cos(α), sin(α) * cos(β))
Y_{unit}: O + (-1 * sin(α), cos(α) * cos(β))
Z_{unit}: O + (0, sin(β))
u = Vector(O, X_{unit})
v = Vector(O, Y_{unit})
w = Vector(O, Z_{unit})
L = 5 (slider from 1 to 10, step 1)
a = Vector(O - L * v, O + L * v)
b = Vector(O - L * w, O + L * w)
z = Vector(O - L * u, O + L * u)
A_1: O + L * u
B_1: O + L * v
Z: O + L * w
c = false
d = false
Q_2: 0.2 * Corner[2] + 0.8 * Corner[1]
Q_3: (x(Q_2), y(Corner[3]))
多邊形1, e, q_2, q_3, f = Polygon(Corner[1], Q_2, Q_3, Corner[4])
g = Segment(Q_2, Q_3)
A1: O + 5 * u + 4 * v + 2 * w
A2: O + 5 * u + 4 * v - 2 * w
A3: O + 5 * u - 4 * v + 2 * w
A4: O - 6 * u + 4 * v + 2 * w
A5: O - 6 * u - 4 * v + 2 * w
A6: O + 5 * u - 4 * v - 2 * w
A7: O - 6 * u + 4 * v - 2 * w
A8: O - 6 * u - 4 * v - 2 * w
h, i = SDLine(A3, A1, A6, A5)
j, k = SDLine(A1, A4, A7, A5)
l, m = SDLine(A5, A3, A8, A4)
n_1, p = SDLine(A4, A5, A7, A1)
q, r = SDLine(A4, A7, A2, A8)
s, t = SDLine(A1, A2, A6, A7)
a_1, b_1 = SDLine(A5, A8, A7, A6)
c_1, d_1 = SDLine(A3, A6, A8, A2)
e_1, f_1 = SDLine(A8, A7, A5, A6)
g_1, h_1 = SDLine(A7, A2, A4, A8)
i_1, j_1 = SDLine(A6, A8, A3, A2)
k_1, l_1 = SDLine(A2, A6, A1, A7)
n = 0 (slider from 0 to 3, step 1)
α1 = Angle(A7, A2, A1)
α2 = Angle(A8, A7, A4)
α3 = Angle(A6, A8, A5)
α4 = Angle(A2, A6, A3)
α5 = Angle(A3, A5, A4)
α6 = Angle(A8, A6, A2)
t1 = 0 (slider from 0 to 1, step 0.01)
P1: A4 + t1 * Vector[A4, A7]
m_1 = Segment(A4, P1)
t2 = 0 (slider from 0 to 1, step 0.01)
P_2: A7 + t2 * Vector[A7, A2]
p_1 = Segment(P_2, A7)
t3 = 0 (slider from 0 to 1, step 0.01)
P3: A4 + t3 * Vector[A4, A2]
q_1 = Segment(A4, P3)
A6' = Mirror(A6, A2)
A8' = Mirror(A8, A7)
poly1, s_1, t_1, a_2, b_2 = Polygon(A6, A6', A8', A8)
r_1 = Segment(A6, A6')
cb = Circle(A7, 0.8)
ca = Circle(A2, 0.8)
B2 = Intersect(cb, g_1)
B1 = Intersect(cb, m_1)
B3: B1 + B2 - A7
c_2 = Segment(B3, B1)
d_2 = Segment(B3, B2)
B4, A = Intersect(ca, r_1)
B5 = Intersect(ca, g_1)
B6: B4 + B5 - A2
e_2 = Segment(B4, B6)
f_2 = Segment(B5, B6)
B7 = Intersect(ca, q_1)
B8: B4 + B7 - A2
g_2 = Segment(B8, B4)
h_2 = Segment(B8, B7)
i_2 = Segment(B8, B7)
j_2 = Segment(B8, B4)

Tool: Poly_B3
Input: A, B, C
Output: poly1'

α = Angle(C, B, A)
d: sqrt(sgn(sin(α)))
A' = Dilate(A, d, A)
B' = Dilate(B, d, A)
C' = Dilate(C, d, A)
poly1', c', a', b' = Polygon(A', B', C')

Tool: Poly_B5
Input: A, B, C, D, E
Output: poly1'

poly1, a, b, c, d, e = Polygon(A, B, C, D, E)
F = Midpoint(b)
G = Midpoint(d)
α = Angle(G, F, A)
f: sqrt(sgn(sin(α)))
A' = Dilate(A, f, A)
B' = Dilate(B, f, A)
C' = Dilate(C, f, A)
D' = Dilate(D, f, A)
E' = Dilate(E, f, A)
poly1', a', b', c', d', e' = Polygon(A', B', C', D', E')

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)