pysted.temporal.Polygon

class pysted.temporal.Polygon(coords=None, random_params={}, parent=None)

A Polygon is a set of Nodes that are closed to the exterior world

Polygon.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 nodes

Polygon.apply_jitter([mean, std])

This method allows to jitter the position of each nodes.

Polygon.area()

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.

Polygon.reset_force()

Reset the current force that is being applied on all nodes

Polygon.reset_speed()

Reset the current speed that is being applied on all nodes

Polygon.return_shape([shape])

Return the polygon indices

Polygon.update()

Updates the position of each node based on the current forces and speeds