rotate_y#

DataSet.rotate_y(angle: float, point=(0.0, 0.0, 0.0), transform_all_input_vectors=False, inplace=False)[source]#

Rotate mesh about the y-axis.

Note

See also the notes at transform() which is used by this filter under the hood.

Parameters
anglefloat

Angle in degrees to rotate about the y-axis.

pointfloat, optional

Point to rotate about.

transform_all_input_vectorsbool, optional

When True, all input vectors are transformed. Otherwise, only the points, normals and active vectors are transformed.

inplacebool, optional

Updates mesh in-place.

Returns
pyvista.DataSet

Rotated dataset.

Examples

Rotate a cube 30 degrees about the y-axis.

>>> import pyvista
>>> mesh = pyvista.Cube()
>>> rot = mesh.rotate_y(30, inplace=False)

Plot the rotated mesh.

>>> pl = pyvista.Plotter()
>>> _ = pl.add_mesh(rot)
>>> _ = pl.add_mesh(mesh, style='wireframe', line_width=3)
>>> _ = pl.add_axes_at_origin()
>>> pl.show()
../../../_images/pyvista-DataSet-rotate_y-1_00_00.png