BendNetwork.smooth

BendNetwork.smooth(fixed=None, kmax=100, damping=0.5, callback=None, callback_args=None)

Smooth a graph by moving every free node to the centroid of its neighbors.

Parameters:
graphMesh

A graph object.

fixedlist, optional

The fixed nodes of the graph.

kmaxint, optional

The maximum number of iterations.

dampingfloat, optional

The damping factor.

callbackcallable, optional

A user-defined callback function to be executed after every iteration.

callback_argslist, optional

A list of arguments to be passed to the callback.

Returns:
None
Raises:
Exception

If a callback is provided, but it is not callable.