Simplification and refinement for hierarchical structure of triangular meshes