rotate_coords#
- rotate_coords(network, **kwargs)[source]#
Rotates coordinates a given amount about each axis
- Parameters:
coords (ndarray) – The site coordinates to be transformed.
coords
must be in 3D, but a 2D network can be represented by putting 0’s in the missing dimension.a (scalar, optional) – The amount in degrees to rotate about the x, y, and z-axis, respectively.
b (scalar, optional) – The amount in degrees to rotate about the x, y, and z-axis, respectively.
c (scalar, optional) – The amount in degrees to rotate about the x, y, and z-axis, respectively.
R (array_like, optional) – Rotation matrix. Must be a 3-by-3 matrix since coordinates are always in 3D. If this is given then a, b, and c are ignored.
- Returns:
coords – A copy of the given
coords
is made and returned to the rotation does not occur in place.- Return type:
ndarray
See also