pyvista.Transform.flip_y#
- Transform.flip_y( ) Transform[ソース]#
Compose a reflection about the y-axis.
Create a reflection about the y-axis and
compose()it with the current transformationmatrixaccording to pre-multiply or post-multiply semantics.Internally, the matrix is stored in the
matrix_list.- パラメータ:
- point
VectorLike[float],optional Point to reflect about. By default, the object's
pointis used, but this can be overridden. If set, two additional transformations are composed and added to thematrix_list:translate()topointbefore the reflectiontranslate()away frompointafter the reflection
- multiply_mode'pre' | 'post',
optional Multiplication mode to use when composing the matrix. By default, the object's
multiply_modeis used, but this can be overridden. Set this to'pre'for pre-multiplication or'post'for post-multiplication.
- point
参考
pyvista.DataObjectFilters.flip_yFlip a mesh about the y-axis.
例
Compose a reflection about the y-axis.
>>> import pyvista as pv >>> transform = pv.Transform() >>> _ = transform.flip_y() >>> transform.matrix array([[ 1., 0., 0., 0.], [ 0., -1., 0., 0.], [ 0., 0., 1., 0.], [ 0., 0., 0., 1.]])
Compose a second reflection, but this time about a point.
>>> _ = transform.flip_y(point=(4, 5, 6)) >>> transform.matrix array([[ 1., 0., 0., 0.], [ 0., 1., 0., 10.], [ 0., 0., 1., 0.], [ 0., 0., 0., 1.]])