g⊥h

g∥h

A = (3.1318766203703707, 4.392308664021163)
B = (10.316811805555558, -0.4880246693121716)
g = Line(A, B)
C = (9.855891435185187, 5.015906812169312)
h = Line(C, g)
D = Midpoint(C, A)