Rotation about the y-axis. t: (x1,x2,...xn) return: (x1,x2,...,xn,3,3)
(t)
| 106 | |
| 107 | |
| 108 | def 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 | |
| 125 | def rotz(t): |
nothing calls this directly
no outgoing calls
no test coverage detected