; This arrives at the distance between two points in 3D space from the
; Pythagorean theorem (distance between two points on a 2D plane).
; The coordinate of point 1, 2D: (x1, y1), 3D: (x1, y1, z1).
; The coordinate of point 2, 2D: (x2, y2), 3D: (x2, y2, z2).
L^2=(x1-x2)^2+(y1-y2)^2 ; Distance formula for a 2D Cartesian plane.
distance^2=L^2+(z1-z2)^2 ; Add another leg.
eliminate L ; Combine the two equations.
distance ; Solve to get the distance in 3D Cartesian space.