Hi, you've tried decimate from Blender?
https://wiki.blender.org/index.php/Doc:2.4/Manual/Modifiers/Generate/DecimateHow it compares to your application?
I did some tests and here are my results:1) original dragon.obj > 213504 tris
1.1) simplify dragon.obj out.obj 0.2 > 106752 tris, 106752 faces, 53378 verts
1.2) blender decimate ratio 0.5 > 106752 tris, 71180 faces, 53378 verts
yes, both codes can generate same tris object with different settings.
your code is somewhat faster, but in blender I can live preview.
At the left yours output, at the right blender decimate:
http://postimg.org/image/5uq2hcibf/full/