Jump to content
  • Advertisement
Sign in to follow this  
ddengster

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
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.

Share this post


Link to post
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 this post


Link to post
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 this post


Link to post
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!