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

Started by
4 comments, last by ddengster 7 years, 12 months ago

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.

Advertisement
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.

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.

Eric Richards

SlimDX tutorials - http://www.richardssoftware.net/

Twitter - @EricRichards22

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 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.

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

This topic is closed to new replies.

Advertisement