Adaptive triangular mesh generation