<p>The procedure only works for closed meshes or closed parts of a mesh with boundaries.</p>
<p>For vertices <span class="math-container">$V_{i}$</span> on the boundary of an mesh you have to use the following rules:</p>
<p><span class="math-container">$$V_i = \frac{V_{i-1} + 6 V_{i} + V_{i+1}}{8},$$</span> where <span class="math-container">$V_{i-1}$</span> and <span class="math-container">$V_{i+1}$</span> are previous and next vertex on the boundary with respect to <span class="math-container">$V_i$</span>. In your case it would be:</p>
<p><span class="math-container">$$P = \frac{e_2 + 6 P + e_1}{8}.$$</span> New positions on edges of the boundary are inserted as the midpoint between two subsequent vertices. This will nicely smooth the boundaries of the mesh and the generated boundary curve will reproduce a uniform cubic B-spline curve in the limit.</p>
<p>You can also interpolate the corners of your plane if you do not apply this update step to the corners, but let them remain stationary.</p>

CC BY-SA 4.0
2021-06-01T18:36:48.830Z
This seems to work, except for the non-corner edges. Those are slightly bent inward, creating a slightly jagged outer edge, but that could be due to my implementation. Could you please share the source of this solution?
Pepernoot
CC BY-SA 4.0
2021-06-01T19:06:13.927Z
https://graphics.pixar.com/library/SEC/supplemental.pdf You can look at figure 4 for a summary of the CC subdivision rules.
Reynolds
CC BY-SA 4.0
2021-06-01T14:26:03.063Z
2021-06-01T15:23:05.533Z
2021-06-01T15:23:05.533Z
Reynolds
<p>I implemented catmul clark based on <a href="https://en.wikipedia.org/wiki/Catmull%E2%80%93Clark_subdivision_surface" rel="nofollow noreferrer">this</a> Wikipedia article.
And it seems to work fine for meshes where the edge point count is equal to the face point count, but not for planes where the corners have 2 edge points and 1 face point.</p>
<p>The article states the following for this formula</p>
<p><span class="math-container">$$ \frac{F + 2R + (n-3)P}{n} $$</span></p>
<blockquote>
<p>(Note that from the perspective of a vertex P, the number of edges
neighboring P is also the number of adjacent faces, hence n)</p>
</blockquote>
<p>And that seems to be true for cube-like shapes, but not for planes.</p>
<p><a href="https://i.sstatic.net/XUIAu.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/XUIAu.png" alt="point count" /></a></p>
<p>Does this implementation not work for planes, or am I doing something wrong?</p>

CC BY-SA 4.0
2021-06-01T10:54:23.537Z
2 edge points? I can see how this would happen in code, but anyplace you end up with 2 points on top of each other the curves will have the "expected" behavior that occurs when you have to coincident points.
pmw1234
<mesh><subdivision>
Catmull–Clark issue with plane corners
Pepernoot
# Catmull–Clark issue with plane corners

(Asked by: username_0 on 2021-05-31)

I implemented catmul clark based on [this](https://en.wikipedia.org/wiki/Catmull%E2%80%93Clark_subdivision_surface) Wikipedia article.
And it seems to work fine for meshes where the edge point count is equal to the face point count, but not for planes where the corners have 2 edge points and 1 face point.

The article states the following for this formula

$$ \frac{F + 2R + (n-3)P}{n} $$

> (Note that from the perspective of a vertex P, the number of edges
> neighboring P is also the number of adjacent faces, hence n)

And that seems to be true for cube-like shapes, but not for planes.

[![point count](https://i.sstatic.net/XUIAu.png)](https://i.sstatic.net/XUIAu.png)

Does this implementation not work for planes, or am I doing something wrong?

**Tags:** mesh, subdivision

> **Comments:**
> **username_1**: 2 edge points? I can see how this would happen in code, but anyplace you end up with 2 points on top of each other the curves will have the "expected" behavior that occurs when you have to coincident points.  

---

## 1 answers

### Answer by username_2 on 2021-06-01. Score: 1 | Accepted answer

The procedure only works for closed meshes or closed parts of a mesh with boundaries.

For vertices $V\_{i}$ on the boundary of an mesh you have to use the following rules:

$$V\_i = \frac{V\_{i-1} + 6 V\_{i} + V\_{i+1}}{8},$$ where $V\_{i-1}$ and $V\_{i+1}$ are previous and next vertex on the boundary with respect to $V\_i$. In your case it would be:

$$P = \frac{e\_2 + 6 P + e\_1}{8}.$$ New positions on edges of the boundary are inserted as the midpoint between two subsequent vertices. This will nicely smooth the boundaries of the mesh and the generated boundary curve will reproduce a uniform cubic B-spline curve in the limit.

You can also interpolate the corners of your plane if you do not apply this update step to the corners, but let them remain stationary.

> **Comments:**
> **username_0**: This seems to work, except for the non-corner edges. Those are slightly bent inward, creating a slightly jagged outer edge, but that could be due to my implementation. Could you please share the source of this solution?  
> **username_2**: https://graphics.pixar.com/library/SEC/supplemental.pdf You can look at figure 4 for a summary of the CC subdivision rules.  

---

