rotate_points
- compas.geometry.rotate_points(points, angle, axis=None, origin=None)[source]
Rotates points around an arbitrary axis in 3D.
- Parameters
points (sequence[[float, float, float] |
compas.geometry.Point
]) – A list of points.angle (float) – The angle of rotation in radians.
axis ([float, float, float] |
compas.geometry.Vector
, optional) – The rotation axis. Default is[0.0, 0.0, 1.0]
origin ([float, float, float] |
compas.geometry.Point
, optional) – The origin of the rotation axis. Default is[0.0, 0.0, 0.0]
.
- Returns
list[[float, float, float]] – The rotated points
Notes
For more info, see 1.
References
- 1
Wikipedia. Rotation matrix. Available at: https://en.wikipedia.org/wiki/Rotation_matrix.
Examples
>>>