# Is there a named algorithm for this method of splitting a large triangle into smaller ones?

This topic is 962 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

My initial idea for this implementation:

- if acute triangle -> split into 4 triangles with vertices on midpoints of the 3 edges of the larger triangle

- if obtuse triangle -> split into 2 triangles with vertex at the midpt of the largest base edge

- repeat until all triangles are smaller than a certain area or edges fulfil a certain minimal length

the geometry will be used for small area terrain animations/deformations. would like to know if there're any pitfalls or even simpler alternatives.

##### Share on other sites
I don't know of a name, but here's a version I like better:
- For each side of the triangle, check if it's longer than some threshold.
- If all 3 sides are too long, divide the triangle into 4 triangles.
- If 2 sides are too long, divide the triangle into 3 triangles (there are 2 ways to do this).
- If 1 side is too long, divide the triangle into 2 triangles.

This has the huge advantage that the subdivision can be done independently in triangles of the same triangulation without introducing cracks.

Here's an even simpler version with the same feature:
- Pick the longest side.
- If it's longer than some threshold, divide the triangle into 2 triangles.

##### Share on other sites

Generally, the process is known as subdivision, and is a pretty extensively studied subject in graphics.

Loop Subdivision

Catmull-Clark Subdivision

I suspect that handling the acute and obtuse cases differently might be slower than simply doing the midpoint subdivision in all cases.

##### Share on other sites

I don't know of a name, but here's a version I like better:
- For each side of the triangle, check if it's longer than some threshold.
- If all 3 sides are too long, divide the triangle into 4 triangles.
- If 2 sides are too long, divide the triangle into 3 triangles (there are 2 ways to do this).
- If 1 side is too long, divide the triangle into 2 triangles.

This has the huge advantage that the subdivision can be done independently in triangles of the same triangulation without introducing cracks.

Here's an even simpler version with the same feature:
- Pick the longest side.
- If it's longer than some threshold, divide the triangle into 2 triangles.

Regarding the first method, how is it that you can ensure no cracks? For the 2 sides too long case, when you subdivide into 3 triangles (with a 'z' pattern), the edge that is split in half has an alternative face which may not comprise of the same vertex. If you animate the vertices, you would see cracks.

##### Share on other sites

I don't know of a name, but here's a version I like better:
- For each side of the triangle, check if it's longer than some threshold.
- If all 3 sides are too long, divide the triangle into 4 triangles.
- If 2 sides are too long, divide the triangle into 3 triangles (there are 2 ways to do this).
- If 1 side is too long, divide the triangle into 2 triangles.

This has the huge advantage that the subdivision can be done independently in triangles of the same triangulation without introducing cracks.

Here's an even simpler version with the same feature:
- Pick the longest side.
- If it's longer than some threshold, divide the triangle into 2 triangles.

Regarding the first method, how is it that you can ensure no cracks? For the 2 sides too long case, when you subdivide into 3 triangles (with a 'z' pattern), the edge that is split in half has an alternative face which may not comprise of the same vertex. If you animate the vertices, you would see cracks.

I don't understand the problem. Both methods ensure no cracks by making the criterion for splitting an edge depend only on features of the edge. Cracks only happen when two triangles share an edge and you decide to split the edge on one triangle but not in the other. Edited by Álvaro

##### Share on other sites

I don't know of a name, but here's a version I like better:
- For each side of the triangle, check if it's longer than some threshold.
- If all 3 sides are too long, divide the triangle into 4 triangles.
- If 2 sides are too long, divide the triangle into 3 triangles (there are 2 ways to do this).
- If 1 side is too long, divide the triangle into 2 triangles.

This has the huge advantage that the subdivision can be done independently in triangles of the same triangulation without introducing cracks.

Here's an even simpler version with the same feature:
- Pick the longest side.
- If it's longer than some threshold, divide the triangle into 2 triangles.

Regarding the first method, how is it that you can ensure no cracks? For the 2 sides too long case, when you subdivide into 3 triangles (with a 'z' pattern), the edge that is split in half has an alternative face which may not comprise of the same vertex. If you animate the vertices, you would see cracks.

I don't understand the problem. Both methods ensure no cracks by making the criterion for splitting an edge depend only on features of the edge. Cracks only happen when two triangles share an edge and you decide to split the edge on one triangle but not in the other.

Yea, I was thinking of that shared edge case you mentioned. thanks for the heads up

1. 1
2. 2
3. 3
Rutin
20
4. 4
khawk
14
5. 5
frob
12

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633656
• Total Posts
3013191
×