I've been reading this article on how to extract the plane equations from the view and projection matrices. And I can understand most of it. However, the only thing that is unclear to me (and that might be for lack of mathematical knowledge), is the part where they transform their inequality 0 < v * (row4 + row1) into the equality v * (row4 + row1) = 0 (that is for calculating the plane in the x negative side).

Usually, to convert inequality to equality you use a slack variable, but in their approach, none was used. How can we be sure that v * (row4 + row1) will always be zero on that frustum plane? All we know is that the resulting value of v * (row4 + row1) has to be positive to be on the right side of that frustum plane.

I also know how the plane equation is constructed. How we use the dot product of two vectors (any vector in the plane and the normal a,b,c) must be equal to zero: ax + by + cz + d = 0. I can see that the resulting expression from v * (row4 + row1) > 0 results into a identical plane equation. My only doubts are in the conversion from inequality to equality.


1 Answer 1


The volume inside of the frustum is defined by a set of inequalities, and since we are trying to find the boundaries of the frustum, we set the inequalities to equalities. That's really all it is.

To take a 1D example, if we have a "frustum" defined by 0 < x < 5, then of course the bounding points of it are defined by x = 0 and x = 5. Replacing each inequality by an equality, in turn, gives you the most extreme point you can get to in that direction.

Slack variables, BTW, don't really convert inequalities to equalities. They just transform the inequality into a standardized form "x > 0" (or "x ≥ 0") for some slack variable x.

  • 1
    $\begingroup$ Thanks! It turned out to be way simpler than I thought! I would give +1 if I head the reputation! :) $\endgroup$
    – Hirosam
    Commented Feb 25, 2021 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.