MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _view_transformation_uvw

Function _view_transformation_uvw

lib/mpl_toolkits/mplot3d/proj3d.py:88–108  ·  view source on GitHub ↗

Return the view transformation matrix. Parameters ---------- u : 3-element numpy array Unit vector pointing towards the right of the screen. v : 3-element numpy array Unit vector pointing towards the top of the screen. w : 3-element numpy array Unit

(u, v, w, E)

Source from the content-addressed store, hash-verified

86
87
88def _view_transformation_uvw(u, v, w, E):
89 """
90 Return the view transformation matrix.
91
92 Parameters
93 ----------
94 u : 3-element numpy array
95 Unit vector pointing towards the right of the screen.
96 v : 3-element numpy array
97 Unit vector pointing towards the top of the screen.
98 w : 3-element numpy array
99 Unit vector pointing out of the screen.
100 E : 3-element numpy array
101 The coordinates of the eye/camera.
102 """
103 Mr = np.eye(4)
104 Mt = np.eye(4)
105 Mr[:3, :3] = [u, v, w]
106 Mt[:3, -1] = -E
107 M = np.dot(Mr, Mt)
108 return M
109
110
111def _persp_transformation(zfront, zback, focal_length):

Callers

nothing calls this directly

Calls 1

dotMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…