Quote:
How can you test how collinear two segments are?
One way is to normalize them (which isn't strictly necessary, but can make the results more consistent), and then take the 'perp dot product' of the two normalized vectors. If the result is below some threshold, they can be considered colinear (what makes for a good threshold value depends on the context).
Quote:
I've been playing with the switches in triangle and got this as my third try.
http://yfrog.com/10thirdtryp
I would try that again, using the original switches in the code I sent you (I'm not sure what switches you're using, but it doesn't look like you're getting a constrained triangulation).
Quote:
Let's see. The graph would be a list of each triangle and the triangles each is connected to(Pointers to which ones it is connected)? The cost of the adjacent triangles would be the distance between both centers?
You can do it that way, but IMX it's more effective to place the nodes at the midpoints of unconstrained edges, rather than at the triangle centers. Using the triangle centers as nodes and applying some simple line-of-sight path smoothing once the path is constructed may be perfectly sufficient though, so you could certainly try that first and see how well it works.