import numpy as np
def point_in_plane(A, p1, p2, p3, threshold=1e-6):
# Calculate the normal vector of the plane
normal = np.cross(p2 - p1, p3 - p1)
# Calculate the distance between the point A and the plane
distance = np.abs(np.dot(normal, A - p1)) / np.linalg.norm(normal)
# If the distance is within the threshold, then the point A lies on the plane
return distance < threshold