rotate_points

compas.geometry.rotate_points(points, angle, axis=None, origin=None)[source]

Rotates points around an arbitrary axis in 3D.

Parameters
  • points (list of point) – A list of points.

  • angle (float) – The angle of rotation in radians.

  • axis (vector, optional) – The rotation axis. Default is [0.0, 0.0, 1.0]

  • origin (point, optional) – The origin of the rotation axis. Default is [0.0, 0.0, 0.0].

Returns

list of point – The rotated points

Examples

>>>

Notes

For more info, see 1.

References

1

Wikipedia. Rotation matrix. Available at: https://en.wikipedia.org/wiki/Rotation_matrix.