added function that clips a line against a half space