Polygon.transform

Polygon.transform(T)[source]

Transform this polygon.

Parameters

T (compas.geometry.Transformation or list of list) – The transformation.

Examples

>>> from math import radians
>>> from compas.geometry import Rotation
>>> polygon = Polygon.from_sides_and_radius_xy(4, 1.0)
>>> R = Rotation.from_axis_and_angle([0.0, 0.0, 1.0], radians(45))
>>> polygon.transform(R)
>>> polygon.points[0]
Point(-0.707, 0.707, 0.000)