## Import the mesh of a pawn
data(pawn_250)
## Plot the original mesh
plot.mesh.2.5D(mesh, main = "Original mesh, 250 nodes")
## Simplify the mesh down to 200 nodes; assume the components of the
## edge cost functions are equally weighted and that the data locations
## coincide with the vertices of the mesh
out <- simplify.mesh.2.5D(mesh, 200)
## Plot the simplified mesh
plot.mesh.2.5D(out$mesh, loc = out$locations, main = "Simplified mesh, 200 nodes")
Run the code above in your browser using DataLab