兩條線段距離和的最小值
Author: 藍邦偉　老師

討論A,B兩2點在直線L的同側或反側，拉動P點觀察

在直線L上找一點P使得， \overline{ PA } + \overline{ PB }有最小值 

L

顯示正確P點位置

顯示橢圓

P

P

A = (5.66, 3.7)
B = (-2.1, -1.16)
P = Point(l)
a = Segment(P, A)
b = Segment(P, B)
B' = Mirror(B, l)
p = Line(A, B')
C = Intersect(p, l)
c = Ellipse(B, A, P)
k = Segment(B, B')
d = false
e = false
q: y(A) * y(B)
f = Line(A, B)
D = Intersect(l, f)
E = Point(l)
g = Segment(A, E)
h = Segment(E, B)
文字1: "\overline{ PA }+ \overline{ PB }= " + (If[y(A) * y(B) > 0.0, a + b, g + h])