Note
Go to the end to download the full example code
Fury Cone Actor#
This example shows how to use the cone actor.
import numpy as np
from fury import actor, window
First thing, you have to specify centers, directions, and colors of the cone
centers = np.zeros([3, 3])
dirs = np.identity(3)
colors = np.identity(3)
The below cone actor is generated by repeating the cone primitive.
repeating what we did but this time with random directions, and colors Here, we’re using vtkConeSource to generate the cone actor
Adding our cone actors to scene.
scene.add(cone_actor1)
scene.add(cone_actor2)
interactive = False
if interactive:
window.show(scene, size=(600, 600))
window.record(scene, out_path="viz_cone.png", size=(600, 600))
/opt/homebrew/Caskroom/miniforge/base/envs/py39/lib/python3.9/site-packages/sphinx_gallery/gen_rst.py:722: UserWarning: We'll no longer accept the way you call the record function in future versions of FURY.
Here's how to call the Function record: record(scene='value', cam_pos='value', cam_focal='value', cam_view='value', out_path='value', path_numbering='value', n_frames='value', az_ang='value', magnification='value', size='value', reset_camera='value', screen_clip='value', stereo='value', verbose='value')
exec(self.code, self.fake_main.__dict__)
Total running time of the script: (0 minutes 0.050 seconds)