Distance is defined by points and :
The first derivatives of with respect to Cartesian coordinates are: