Generate Triangle Strips

Hi,

I was wondering how do you procedure when trying to generate triangle strips from a mesh of simple triangles…

Is there any good free software to do this?

Do you know any algorithm?

Thanks a lot!

There are a few algorithms to do this if you look around on google, but they start to get really complex. A good starting point would be to code up a simple/dumb algorithm to do this [start with the first triangle, start by examining the next triangle in your list, see if they connect, if they do add that as your next triangle in your triangle strip list.

A good hint about this:

vector<vertex> list;
list 0, 1, 2 = triangle1 <0,1,2>

when you examine the next one, test against list[size] and list[size-1], which tests against 1 and 2. After you add a second triangle, you add the 1 vertex that is dissimilar, and then your loop can still test against the previous 2 verticies. [hope I make sense here!]

After you get this working properly, the other algorithms mainly differ from this in selecting ‘good triangles’ to start with, and going in smarter directions.

hope this helps.

This should be an extremely helpful resource if you’re looking for an algorithm (there’s source as well):

http://www.codercorner.com/Strips.htm

Nvidia also has one (I haven’t used it but it’s apparently fairly easy to use, make sure you read the readme file) which you can download as a library (source included):

http://developer.nvidia.com/view.asp?IO=nvtristrip_library

Check out http://users.pandora.be/tfautre/softdev/