General Solution
To this end, we would like to find such that, which is equivalent to finding a such that
for .
Thus, we can bound as follows:
The last two lines follow from the cases when the direction vector is parallel to the halfplane defined by the row of : . In the second to last case, the point is on the inside of the halfspace; in the last case, the point is on the outside of the halfspace, and so will always be infeasible.
As such, we can find as all points in the region (so long as we do not have the fourth case from above)
which will be empty if there is no intersection.
Read more about this topic: Intersection Of A Polyhedron With A Line
Famous quotes containing the words general and/or solution:
“Mr. Chadband is a large yellow man, with a fat smile, and a general appearance of having a good deal of train oil in his system.”
—Charles Dickens (18121870)
“There is a lot of talk now about metal detectors and gun control. Both are good things. But they are no more a solution than forks and spoons are a solution to world hunger.”
—Anna Quindlen (b. 1953)