Mesh creation of 2D areas

Could you advice me some articles and sample codes about mesh creation of 2D areas ?

Thanks,¨
Martin

I have this great link in my favorites: http://www.cs.berkeley.edu/~jrs/meshf99/

Or do a search on “Delauny triangulation”.
I found a lot of others while searching for “Implicit Surfaces”.

Or maybe all you need are the glu tesselators? Just search for them, there’s a lot of information on those in the web.

-Ilkka

Originally posted by JustHanging:
[b]Or maybe all you need are the glu tesselators? Just search for them, there’s a lot of information on those in the web.

-Ilkka[/b]

Thanks, I’m not expert in GLU librabrary but I’ll need this mesh not only for graphics purpose… I will do some engineering calculation… Is it possible?

Martin

Yeah, it’s possible. The way these tesselators work is, you give them the contours of the area, and the tesselator outputs the tesselated version through three callbacks, begin, end and vertex.

Normally these callbacks would be directed to glBegin, glEnd and glVertex, but you can replace them with your own routines that gather the triangles into memory. The trick is, that the tesselators recreate the area as a combination of triangles, triangle strips and triangle fans. So you’ll have to write your own tiny state machine which simulates the way OpenGL produces triangles from these.

Another option is to let OpenGL just draw them and use feedback mode to get the triangulation. This method comes with it’s own set of problems, so I’d go with custom callbacks if I was you.

-Ilkka