<p>The volume <em>inside</em> of the frustum is defined by a set of inequalities, and since we are trying to find the <em>boundaries</em> of the frustum, we set the inequalities to equalities. That's really all it is.</p>
<p>To take a 1D example, if we have a &quot;frustum&quot; defined by 0 &lt; x &lt; 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.</p>
<p>Slack variables, BTW, don't really convert inequalities to equalities. They just transform the inequality into a standardized form &quot;x &gt; 0&quot; (or &quot;x ≥ 0&quot;) for some slack variable x.</p>

CC BY-SA 4.0
2021-02-25T18:05:51.220Z
Thanks! It turned out to be way simpler than I thought! I would give +1 if I head the reputation! :)
Hirosam
CC BY-SA 4.0
2021-02-25T18:00:47.460Z
2021-02-25T18:00:47.460Z
Nathan Reed
<p>I've been reading <a href="https://www.gamedevs.org/uploads/fast-extraction-viewing-frustum-planes-from-world-view-projection-matrix.pdf" rel="nofollow noreferrer">this</a> 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 <code>0 &lt; v * (row4 + row1)</code> into the equality <code> v * (row4 + row1) = 0</code> (that is for calculating the plane in the x negative side).</p>
<p>Usually, to convert inequality to equality you use a <a href="https://en.wikipedia.org/wiki/Slack_variable" rel="nofollow noreferrer">slack variable</a>, but in their approach, none was used. How can we be sure that <code> v * (row4 + row1)</code> will always be zero on that frustum plane? All we know is that the resulting value of <code> v * (row4 + row1)</code>  <strong>has</strong> to be positive to be on the right side of that frustum plane.</p>
<p>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: <code>ax + by + cz + d = 0</code>. I can see that the resulting expression from <code>v * (row4 + row1) &gt; 0</code> results into a identical plane equation. My only doubts are in the conversion from inequality to equality.</p>

<opengl><mathematics><optimization>
Understanding inequality to equality in the Hartmann & Gribbs frustum planes extraction method
Hirosam
# Understanding inequality to equality in the Hartmann & Gribbs frustum planes extraction method

(Asked by: username_0 on 2021-02-25)

I've been reading [this](https://www.gamedevs.org/uploads/fast-extraction-viewing-frustum-planes-from-world-view-projection-matrix.pdf) 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](https://en.wikipedia.org/wiki/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.

**Tags:** opengl, mathematics, optimization


---

## 1 answers

### Answer by username_1 on 2021-02-25. Score: 1 | Accepted answer

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.

> **Comments:**
> **username_0**: Thanks! It turned out to be way simpler than I thought! I would give +1 if I head the reputation! :)  

---

