I'm trying to find an easy to implement algorithm that will take a non-convex polygon with no holes and find a triangulation of it. My googling is returning a lot of math when what I really need is an algorithm or some source code to work from.
Name:
Anonymous2009-03-17 20:05
Hi, I'm trying to do my homework and Google doesn't have any source code I can steal. I run Linux so I'm a real programmer can you guys help me by giving me code that I can compile and pretend like I'm programming.
Name:
Anonymous2009-03-17 20:09
>>2
Wrong, they don't make you do computational geometry in CS schools. It is because the fastest collision detection algorithms only work on convex polygons. I'm asking for any links that explain how to do this in polynomial time that aren't 100 page math papers.
Name:
Anonymous2009-03-17 20:10
>>3
If Lisp was a car, it wouldn't start if you forget to close any of the doors.
Name:
Anonymous2009-03-17 20:11
>>3
Any answer would be a 100 page math paper. Learn your fucking job.
Name:
Anonymous2009-03-17 20:15
>>5 We here at /prog/ only know how to do expert memery. What, you thought we knew anything about Computer Science? Lol, you naive fool.
// FIXME: check to see if the entire surface degenerated
// after snapping
// rotate the points so that the initial vertex is between
// two non-subdivided edges
for ( i = 0 ; i < numVerts ; i++ ) {
if ( originals[ (i+1) % numVerts ] == originals[ i ] ) {
continue;
}
j = (i + numVerts - 1 ) % numVerts;
k = (i + numVerts - 2 ) % numVerts;
if ( originals[ j ] == originals[ k ] ) {
continue;
}
break;
}
if ( i == 0 ) {
// fine the way it is
c_natural++;
>>13
The lightmap and texture variables along with rotating vertexes indicated that this was probably not relevant. A google search shows that this is an excerpt from the quake3 source code and is indeed not relevant. Thanks for trying though!