pyvista.DataObjectFilters.rotate_y#
- DataObjectFilters.rotate_y(
- angle: float,
- point: VectorLike[float] | None = None,
- transform_all_input_vectors: bool = False,
- inplace: bool = False,
Rotate mesh about the y-axis.
Note
See also the notes at
transform()which is used by this filter under the hood.- Parameters:
- angle
float Angle in degrees to rotate about the y-axis.
- point
VectorLike[float],optional Point to rotate about.
- transform_all_input_vectorsbool, default:
False When
True, all input vectors are transformed. Otherwise, only the points, normals and active vectors are transformed.- inplacebool, default:
False Updates mesh in-place.
- angle
- Returns:
- output
DataSet|MultiBlock Rotated dataset. Return type matches input.
- output
See also
pyvista.Transform.rotate_yConcatenate a rotation about the y-axis with a transformation.
Examples
Rotate a cube 30 degrees about the y-axis.
>>> import pyvista as pv >>> mesh = pv.Cube() >>> rot = mesh.rotate_y(30, inplace=False)
Plot the rotated mesh.
>>> pl = pv.Plotter() >>> _ = pl.add_mesh(rot) >>> _ = pl.add_mesh(mesh, style='wireframe', line_width=3) >>> _ = pl.add_axes_at_origin() >>> pl.show()