PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Tessellation routine needed

I'm currently using a simplistic fan tessellation routine that I whipped up. I'm looking for something more robust. I would like a routine that will decide if fans or strips are best for a given polygon, then choose the optimum vertices to result in tris as close to equilateral as possible. I've searched to no avail. Thanks.

Dan East
While I dont have an answer to you question, I have another question :).

What are you rendering that you can often fit into fans? I find that not many objects actually work well as fans and end up using strips.
That is the most simplistic method of triangle tessellation, which is why I started with it.

Dan East
Jasper · 28 Aug 2003, 06:29 UTC — Tessellation routine needed
Dan East wrote:
I would like a routine that will decide if fans or strips are best for a given polygon, then choose the optimum vertices to result in tris as close to equilateral as possible. I've searched to no avail. Thanks.


Dan,

You could try this:

http://www-2.cs.cmu.edu/~quake/triangle.html

While it may not help completely with the fans or strips decision, it will produce optimal tesselation with equilateral triangles and is very robust.
That looks like an excellent piece of software. However I'm needing source code, or at least an algorithm, that I can incorporate into my map converter. This appears to be a stand-alone tool.

Update: I'm reading their papers now on Delaunay triangulation. Hopefully it is something fairly straightforward. :)

Dan East
Delaunay is straigtforward, until you reach constrained delaunay. :) I once tried to get a constrained delaunay tetrahedralizer working, but it got too complex so I went for BSP's instead. I needed it for a portal engine, to split up an arbitrary scene into convex polyhedra. Delaunay is good for that. :)
Okay, it is distributed as source code, so that means I don't have to be nearly as smart now. Too bad it is a .shar file. Now I need to figure out how to extract the source from that.

Dan East
Phantom wrote:
Delaunay is straigtforward, until you reach constrained delaunay. :) I once tried to get a constrained delaunay tetrahedralizer working, but it got too complex so I went for BSP's instead. I needed it for a portal engine, to split up an arbitrary scene into convex polyhedra. Delaunay is good for that. :)


Yeah, their paper talks of a "triangle eating virus". Such a thing could be very dangerous if it got loose on Randall's PC. ;)

Dan East
.shar is shell archive. Just make it executable and run it in any Unix shell. It will self extract.
Dan East wrote:
Okay, it is distributed as source code, so that means I don't have to be nearly as smart now. Too bad it is a .shar file. Now I need to figure out how to extract the source from that.


I remember spending hours getting that .shar package to extract so you can get a .zip of the triangle v1.4 package here:

http://www.greatsimulations.com/downloa ... e-v1.4.zip

I can vouch for the robustness of the code, having used it to succesfully triangulate worldwide coastline data for our flight sims
Thanks!

I have some sea shells from our trip to the beach last month, some spent 9mm shells, and a couple boxes of shotgun shells, but no unix shells. :)

Dan East
Dan:
I think I have some unix shells I could send you. Those are the shells you cover with cheese and eat... right? ;)

Cheers,

jb