function perpendicularFoot(point, line) {

  var a = line[0], b = line[1];

  // relative position of b from a
  var bd = { x: b.x - a.x, y: b.y - a.y };

  // solve equation system to the parametrized vectors param real value
  var r = solveLambaSystem([ a.x, a.y ], [ bd.x, bd.y ], [ point.x, point.y ]);

  return { x: a.x + r * bd.x, y: a.y + r * bd.y };
}
Calculates the position of the perpendicular foot.

@param {Point} point
@param {Point[]} line

@return {Point}