Apply scale transforms and project vectors. Parameters ---------- vecs : ... x 3 np.ndarray Input vectors. axes : Axes3D The 3D axes (used for scale transforms and projection matrix).
(vecs, axes)
| 167 | |
| 168 | |
| 169 | def _scale_proj_transform_vectors(vecs, axes): |
| 170 | """ |
| 171 | Apply scale transforms and project vectors. |
| 172 | |
| 173 | Parameters |
| 174 | ---------- |
| 175 | vecs : ... x 3 np.ndarray |
| 176 | Input vectors. |
| 177 | axes : Axes3D |
| 178 | The 3D axes (used for scale transforms and projection matrix). |
| 179 | """ |
| 180 | result_shape = vecs.shape |
| 181 | xs, ys, zs = _apply_scale_transforms( |
| 182 | vecs[..., 0], vecs[..., 1], vecs[..., 2], axes) |
| 183 | vec = _vec_pad_ones(xs.ravel(), ys.ravel(), zs.ravel()) |
| 184 | product = np.dot(axes.M, vec) |
| 185 | tvecs = product[:3] / product[3] |
| 186 | return tvecs.T.reshape(result_shape) |
| 187 | |
| 188 | |
| 189 | def _proj_transform_vec_clip(vec, M, focal_length): |
nothing calls this directly
no test coverage detected
searching dependent graphs…