vispy.visuals.sphere module#

class vispy.visuals.sphere.SphereVisual(radius=1.0, cols=30, rows=30, depth=30, subdivisions=3, method='latitude', vertex_colors=None, face_colors=None, color=(0.5, 0.5, 1, 1), edge_color=None, shading=None, **kwargs)#

Bases: CompoundVisual

Visual that displays a sphere

Parameters:
radiusfloat

The size of the sphere.

colsint

Number of cols that make up the sphere mesh (for method=’latitude’ and ‘cube’).

rowsint

Number of rows that make up the sphere mesh (for method=’latitude’ and ‘cube’).

depthint

Number of depth segments that make up the sphere mesh (for method=’cube’).

subdivisionsint

Number of subdivisions to perform (for method=’ico’).

methodstr

Method for generating sphere. Accepts ‘latitude’ for latitude-longitude, ‘ico’ for icosahedron, and ‘cube’ for cube based tessellation.

vertex_colorsndarray

Same as for MeshVisual class. See create_sphere for vertex ordering.

face_colorsndarray

Same as for MeshVisual class. See create_sphere for vertex ordering.

colorColor

The Color to use when drawing the sphere faces.

edge_colortuple or Color

The Color to use when drawing the sphere edges. If None, then no sphere edges are drawn.

shadingstr | None

Shading to use.

property border#

The vispy.visuals.MeshVisual that used to draw the border.

property mesh#

The vispy.visuals.MeshVisual that used to fil in.