Sphere(radius=0.5, center=(0, 0, 0), direction=(0, 0, 1), theta_resolution=30, phi_resolution=30, start_theta=0, end_theta=360, start_phi=0, end_phi=180)

Create a vtk Sphere.

radiusfloat, optional

Sphere radius.

centernp.ndarray or list, optional

Center in [x, y, z].

directionlist or tuple or np.ndarray, optional

Direction the top of the sphere points to in [x, y, z].

theta_resolutionint , optional

Set the number of points in the longitude direction (ranging from start_theta to end_theta).

phi_resolutionint, optional

Set the number of points in the latitude direction (ranging from start_phi to end_phi).

start_thetafloat, optional

Starting longitude angle.

end_thetafloat, optional

Ending longitude angle.

start_phifloat, optional

Starting latitude angle.

end_phifloat, optional

Ending latitude angle.


Sphere mesh.


Create a sphere using default parameters.

>>> import pyvista
>>> sphere = pyvista.Sphere()
>>> sphere.plot(show_edges=True)

Create a quarter sphere by setting end_theta.

>>> sphere = pyvista.Sphere(end_theta=90)
>>> out = sphere.plot(show_edges=True)