Note
Click here to download the full example code
FURY sphere Actor#
This example shows how to use both primitive and vtkSource sphere actor.
import numpy as np
from fury import actor, window
First thing, you have to specify centers and colors of the sphere
The below sphere actor is generated by repeating the sphere primitive.
prim_sphere_actor = actor.sphere(centers, colors=colors, radii=5)
This time, we’re using vtkSphereSource to generate the sphere actor
Adding our sphere actors to scene.
scene.add(prim_sphere_actor)
scene.add(vtk_sphere_actor)
interactive = False
if interactive:
window.show(scene, size=(600, 600))
window.record(scene, out_path='viz_sphere.png', size=(600, 600))

Total running time of the script: ( 0 minutes 0.071 seconds)