MCPcopy Create free account
hub / github.com/OpenMeshLab/MeshXL / roty_batch

Function roty_batch

utils/pc_util.py:108–122  ·  view source on GitHub ↗

Rotation about the y-axis. t: (x1,x2,...xn) return: (x1,x2,...,xn,3,3)

(t)

Source from the content-addressed store, hash-verified

106
107
108def roty_batch(t):
109 """Rotation about the y-axis.
110 t: (x1,x2,...xn)
111 return: (x1,x2,...,xn,3,3)
112 """
113 input_shape = t.shape
114 output = np.zeros(tuple(list(input_shape) + [3, 3]))
115 c = np.cos(t)
116 s = np.sin(t)
117 output[..., 0, 0] = c
118 output[..., 0, 2] = s
119 output[..., 1, 1] = 1
120 output[..., 2, 0] = -s
121 output[..., 2, 2] = c
122 return output
123
124
125def rotz(t):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected