Rotate one 3D point or a batch of points around the z-axis by angle θ radians. Compute each transformed coordinate separately:
x′=xcosθ−ysinθ y′=xsinθ+ycosθ z′=zHere, (x,y,z) is an input point. Preserve the input shape and return a floating-point NumPy array.
Input: points = [1, 0, 0], theta = 1.5707963267948966
Output: [0, 1, 0]
Explanation: A positive quarter-turn maps the positive x-axis onto the positive y-axis.
Input: points = [[1, 0, 0], [0, 1, 2]], theta = 1.5707963267948966
Output: [[0, 1, 0], [-1, 0, 2]]
Read coordinates with values[..., 0], values[..., 1], and values[..., 2].
Stack the transformed coordinates with np.stack(..., axis=-1).
Sign in to take notes on this problem
Accepts: array
Accepts: number
Rotate one 3D point or a batch of points around the z-axis by angle θ radians. Compute each transformed coordinate separately:
x′=xcosθ−ysinθ y′=xsinθ+ycosθ z′=zHere, (x,y,z) is an input point. Preserve the input shape and return a floating-point NumPy array.
Input: points = [1, 0, 0], theta = 1.5707963267948966
Output: [0, 1, 0]
Explanation: A positive quarter-turn maps the positive x-axis onto the positive y-axis.
Input: points = [[1, 0, 0], [0, 1, 2]], theta = 1.5707963267948966
Output: [[0, 1, 0], [-1, 0, 2]]
Read coordinates with values[..., 0], values[..., 1], and values[..., 2].
Stack the transformed coordinates with np.stack(..., axis=-1).
Sign in to take notes on this problem
Accepts: array
Accepts: number