pysted.temporal.Polygon
- class pysted.temporal.Polygon(coords=None, random_params={}, parent=None)
A
Polygon
is a set ofNodes
that are closed to the exterior worldPolygon.add_node
(node[, pos])Methods that implements adding a node to the current nodes.
Polygon.apply_force
([mean, std, field])This method allows to apply a
force
on each nodesPolygon.apply_jitter
([mean, std])This method allows to jitter the position of each nodes.
Calculates the area covered by the
Polygon
.Polygon.expand
([scale])Implements an expand method of the
Polygon
.Polygon.generate_random
([num_points, scale, pos])Generates a random set of coords.
Reset the current
force
that is being applied on all nodesReset the current
speed
that is being applied on all nodesPolygon.return_shape
([shape])Return the polygon indices
Updates the position of each node based on the current forces and speeds