ShowDistance

a = Segment(A, B)
b = OrthogonalLine(A, a)
c = OrthogonalLine(B, a)
C = Point(b)
d = Line(C, a)
D = Intersect(d, c)
u = Vector(C, D)
v = Vector(D, C)
E = Midpoint(A, C)
F = Midpoint(B, D)
E' = Mirror(E, C)
F' = Mirror(F, D)
e = Segment(E, E')
f = Segment(F, F')
g = Segment(C, D)