4
4
5
5
import numpy as np
6
6
7
- from matplotlib import _api
8
-
9
7
10
8
def world_transformation (xmin , xmax ,
11
9
ymin , ymax ,
@@ -29,14 +27,6 @@ def world_transformation(xmin, xmax,
29
27
[0 , 0 , 0 , 1 ]])
30
28
31
29
32
- @_api .deprecated ("3.8" )
33
- def rotation_about_vector (v , angle ):
34
- """
35
- Produce a rotation matrix for an angle in radians about a vector.
36
- """
37
- return _rotation_about_vector (v , angle )
38
-
39
-
40
30
def _rotation_about_vector (v , angle ):
41
31
"""
42
32
Produce a rotation matrix for an angle in radians about a vector.
@@ -116,32 +106,6 @@ def _view_transformation_uvw(u, v, w, E):
116
106
return M
117
107
118
108
119
- @_api .deprecated ("3.8" )
120
- def view_transformation (E , R , V , roll ):
121
- """
122
- Return the view transformation matrix.
123
-
124
- Parameters
125
- ----------
126
- E : 3-element numpy array
127
- The coordinates of the eye/camera.
128
- R : 3-element numpy array
129
- The coordinates of the center of the view box.
130
- V : 3-element numpy array
131
- Unit vector in the direction of the vertical axis.
132
- roll : float
133
- The roll angle in radians.
134
- """
135
- u , v , w = _view_axes (E , R , V , roll )
136
- M = _view_transformation_uvw (u , v , w , E )
137
- return M
138
-
139
-
140
- @_api .deprecated ("3.8" )
141
- def persp_transformation (zfront , zback , focal_length ):
142
- return _persp_transformation (zfront , zback , focal_length )
143
-
144
-
145
109
def _persp_transformation (zfront , zback , focal_length ):
146
110
e = focal_length
147
111
a = 1 # aspect ratio
@@ -154,11 +118,6 @@ def _persp_transformation(zfront, zback, focal_length):
154
118
return proj_matrix
155
119
156
120
157
- @_api .deprecated ("3.8" )
158
- def ortho_transformation (zfront , zback ):
159
- return _ortho_transformation (zfront , zback )
160
-
161
-
162
121
def _ortho_transformation (zfront , zback ):
163
122
# note: w component in the resulting vector will be (zback-zfront), not 1
164
123
a = - (zfront + zback )
@@ -215,11 +174,6 @@ def proj_transform(xs, ys, zs, M):
215
174
return _proj_transform_vec (vec , M )
216
175
217
176
218
- transform = _api .deprecated (
219
- "3.8" , obj_type = "function" , name = "transform" ,
220
- alternative = "proj_transform" )(proj_transform )
221
-
222
-
223
177
def proj_transform_clip (xs , ys , zs , M ):
224
178
"""
225
179
Transform the points by the projection matrix
@@ -230,30 +184,10 @@ def proj_transform_clip(xs, ys, zs, M):
230
184
return _proj_transform_vec_clip (vec , M )
231
185
232
186
233
- @_api .deprecated ("3.8" )
234
- def proj_points (points , M ):
235
- return _proj_points (points , M )
236
-
237
-
238
187
def _proj_points (points , M ):
239
188
return np .column_stack (_proj_trans_points (points , M ))
240
189
241
190
242
- @_api .deprecated ("3.8" )
243
- def proj_trans_points (points , M ):
244
- return _proj_trans_points (points , M )
245
-
246
-
247
191
def _proj_trans_points (points , M ):
248
192
xs , ys , zs = zip (* points )
249
193
return proj_transform (xs , ys , zs , M )
250
-
251
-
252
- @_api .deprecated ("3.8" )
253
- def rot_x (V , alpha ):
254
- cosa , sina = np .cos (alpha ), np .sin (alpha )
255
- M1 = np .array ([[1 , 0 , 0 , 0 ],
256
- [0 , cosa , - sina , 0 ],
257
- [0 , sina , cosa , 0 ],
258
- [0 , 0 , 0 , 1 ]])
259
- return np .dot (M1 , V )
0 commit comments