def line_point_projection(ai_AB, ai_M, ai_error_msg_id):
    """ Given the line equation of AB (ABlx, AVly, ABk) and the coordinates of M (MX,MY), returns the coordinates of P, projection of M on AB
  """
    a = ai_AB[0]
    b = ai_AB[1]
    c = ai_AB[2]
    MX = ai_M[0]
    MY = ai_M[1]
    d = -(b * MX - a * MY)
    PX = -(c * a + d * b)
    PY = d * a - c * b
    r_P = PX, PY
    return r_P
