This is an old revision of this page, as edited by CmdrObot(talk | contribs) at 23:07, 18 April 2007(sp: an system→a system). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.Revision as of 23:07, 18 April 2007 by CmdrObot(talk | contribs)(sp: an system→a system)
In general, a convex polyhedron is defined as the intersection of a finite number of halfspaces. That is, a convex polyhedron is the set of solutions of a system of inequations of the form
There are many problems in which it is useful to find the intersection of a ray and a convex polyhedron; for example, in computer graphics, optimization, and even in some Monte Carlo methods. The formal statement of our problem is to find the intersection of the set with the line defined by , where and .
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)