<p>I coded loop subdivision and ran it on a cube with triangle faces. I noticed this:</p>
<p><a href="https://i.sstatic.net/nGaiv.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/nGaiv.png" alt="enter image description here" /></a></p>
<p>I am using doubles to represent my vertex positions, I am not 100% sure these are caused by floating point imprecisions, but since the general shape looks ok I am not sure what else it could be.</p>
<p>Any suggestions on how to find the cause? My linear algebra library is glm and I am coding this in C++.</p>

CC BY-SA 4.0
2020-02-17T18:07:25.120Z
They don't it looks the same with floats
Makogan
CC BY-SA 4.0
2020-02-19T18:06:41.677Z
You're not accidentally updating a source vertex position before it's been referenced by other vertex calculations are you?
Simon F
CC BY-SA 4.0
2020-02-19T18:27:45.153Z
@SimonF I don't think I am, I can go and check again, but the algorithm first calculates all the new positions, stores them in a container, and only once the calculation loop is finished do I start the loop to update the positions.

Also these artifacts only start to pop after the 4th ish iteration, the first 2-3 don't seem to exhibit any artifacts.
Makogan
<c++><mesh><subdivision><float>
Loop subdivision, certain areas converging towards degenerate geometry
Makogan
# Loop subdivision, certain areas converging towards degenerate geometry

(Asked by: username_0 on 2020-02-17)

I coded loop subdivision and ran it on a cube with triangle faces. I noticed this:

[![enter image description here](https://i.sstatic.net/nGaiv.png)](https://i.sstatic.net/nGaiv.png)

I am using doubles to represent my vertex positions, I am not 100% sure these are caused by floating point imprecisions, but since the general shape looks ok I am not sure what else it could be.

Any suggestions on how to find the cause? My linear algebra library is glm and I am coding this in C++.

**Tags:** c++, mesh, subdivision, float

> **Comments:**
> **username_0**: They don't it looks the same with floats  
> **username_1**: You're not accidentally updating a source vertex position before it's been referenced by other vertex calculations are you?  
> **username_0**: @username_1 I don't think I am, I can go and check again, but the algorithm first calculates all the new positions, stores them in a container, and only once the calculation loop is finished do I start the loop to update the positions.  Also these artifacts only start to pop after the 4th ish iteration, the first 2-3 don't seem to exhibit any artifacts.  

---

## 0 answers

