def stable_against_matrix(point, normal):
    """
    Given a point and normal defining a plane, return a 3x3 matrix that
    restricts movement perpendicular to the plane.
    """
    # Normalize the normal vector
    normal = np.array(normal)
    normalized_normal = normal / np.linalg.norm(normal)

    # Create a matrix that restricts movement along the normal direction
    restriction_matrix = np.identity(3) - np.outer(normalized_normal, normalized_normal)
    return restriction_matrix

    Given a point and normal defining a plane, return a 3x3 matrix that
    restricts movement perpendicular to the plane.
    
infinigen/core/constraints/example_solver/geometry/dof.py