An O(n) algorithm to detect if a line intersects a convex polygon consists in checking if any edge of the polygon intersects the line, and look if the number of intersections is
You just need to find a point A that is on the left side of the line and another point that is on the right side. The remaining question is how to find that points quickly.