如何求兩歪斜線的距離
Author: 藍邦偉  老師

x

y

z

顯示單位向量

顯示座標軸

$L_1$

$L_2$

A

$H$

1

2

3

$P$

$H$

顯示公垂線段

Reset

取平面E包含L_1且平行L_2

$ 考慮L_2上一點\;P\;到平面\;E$
$的距離即兩歪垂線的距離$

A: (x((Corner[3] + 39 * Corner[4]) / 40), y((Corner[1] + 9 * Corner[4]) / 10))
B: (x((4 * Corner[3] + 16 * Corner[4]) / 20), y((Corner[1] + 9 * Corner[4]) / 10))
a = Segment(A, B)
C: (3 * A + B) / 4
D: (3 * B + A) / 4
E = Point(a)
c = Circle(C, E)
c' = Translate(c, Vector[C, D])
A' = Rotate(A, 270*°, C)
B' = Rotate(B, 270*°, C)
a' = Segment(A', B')
c'' = Rotate(c', 270*°, C)
D' = Rotate(D, 270*°, C)
E' = Rotate(Translate[E, Vector[C, D]], 90*°, D)
E'' = Rotate(E', 270*°, C)
F = Point(c'')
G = Point(c')
α = Angle(E'', D', F)
b = Segment(D', F)
d = Segment(D, G)
β = Angle(G, D, E')
I: C + (b * cos(α), b * sin(α) * sin(β))
J: C + (b * cos(α + 90°), b * sin(α + 90°) * sin(β))
K: C + (0, b * cos(β))
e = Segment(C, K)
f = Segment(C, I)
g = Segment(C, J)
O = (-1.3881873342237532, 1.2445214862283664)
I' = Translate(I, Vector[C, O])
J' = Translate(J, Vector[C, O])
K' = Translate(K, Vector[C, O])
L = 7 (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, O)
J''' = Dilate(J'', -1, O)
K''' = Dilate(K'', -1, 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
w = Vector(O, K')
u = Vector(O, I')
v = Vector(O, J')
k = false
P_1: O + (L - 1) * u + (L - 1) * v
P_2: O + (L - 1) * u - (L - 1) * v
P_3: O - (L - 1) * u - (L - 1) * v
P_4: O - (L - 1) * u + (L - 1) * v
多邊形1, p_1, p_2, p_3, p_4 = Polygon(P_1, P_2, P_3, P_4)
Q_1: P_1 + (L - 2) * w
Q_2: P_2 + (L - 2) * w
Q_3: P_3 + (L - 2) * w
Q_4: P_4 + (L - 2) * w
R_1: O + L * u + L * w
R_2: O - L * u + L * w
R_3: O - L * u - L * w
R_4: O + L * u - L * w
l = false
S_1: 1 / 3 * P_2 + 2 / 3 * P_3
S_2: 1 / 3 * P_4 + 2 / 3 * P_1
j = Segment(S_1, S_2)
S_3: 2 / 3 * Q_2 + 1 / 3 * Q_3
S_4: 1 / 3 * Q_1 + 2 / 3 * Q_4
m = Segment(S_3, S_4)
H = Midpoint(S_3, S_4)
M = Midpoint(S_2, S_1)
n = Segment(H, M)
o = false
p = false
q = false
N = Point(m)
H_1: N + M - H
r = Segment(N, H_1)