mesh.Mesh.decimate#

Mesh.decimate(reduction)#

Decimate a triangle Mesh.

This method reduces the number of nodes or vertices in the mesh. The decimation is controlled by a target reduction factor.

Parameters#

reductionfloat

Target reduction factor in the interval (0, 1). A value of 0.8 means that the algorithm will attempt to reduce the number of nodes by 80%.

Returns#

Mesh

Returns a decimated triangle Mesh.

Examples#

>>> mesh = shapes.circle(div=100, eltype="tri3")
>>> print(mesh.n_points())
101
>>> mesh_dec = mesh.decimate(0.8)
>>> print(mesh_dec.n_points())
22