Back to 3D Visualization (VTK)
vtk.sphere
Create sphere geometry
Syntax
vtk.sphere() vtk.sphere(radius) vtk.sphere(radius, center) vtk.sphere(radius, center, resolution)
Description
Creates a VTK sphere source with specified radius, center, and resolution. Useful for quick testing and demonstrations.
Parameters
| Name | Description |
|---|---|
| radius(optional) | Sphere radius (default: 1) |
| center(optional) | 3-element vector [x, y, z] for center (default: [0,0,0]) |
| resolution(optional) | Number of phi/theta divisions (default: 32) |
Returns
null (renders sphere inline)