Polygon.transform
- Polygon.transform(T)[source]
Transform this polygon.
- Parameters:
- T
compas.geometry.Transformation
| list[list[float]] The transformation.
- T
- Returns:
- None
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) >>> point = polygon.points[0] >>> print(point) Point(x=-0.707, y=0.707, z=0.000)