Added create_mesh() convenient method, used in the triangle example