- Plotter.orbit_on_path(path=None, focus=None, step=0.5, viewup=None, write_frames=False, threaded=False, progress_bar=False)#
Orbit on the given path focusing on the focus point.
Path of orbital points. The order in the points is the order of travel.
The point of focus the camera.
The timestep between flying to each camera position.
The normal to the orbital plane.
Assume a file is open and write a frame on each camera view during the orbit.
Run this as a background thread. Generally used within a GUI (i.e. PyQt).
Show the progress bar when proceeding through the path. This can be helpful to show progress when generating movies with
Plot an orbit around the earth. Save the gif as a temporary file.
>>> import os >>> from tempfile import mkdtemp >>> import pyvista >>> from pyvista import examples >>> filename = os.path.join(mkdtemp(), 'orbit.gif') >>> plotter = pyvista.Plotter(window_size=[300, 300]) >>> _ = plotter.add_mesh(examples.load_globe(), smooth_shading=True) >>> plotter.open_gif(filename) >>> viewup = [0, 0, 1] >>> orbit = plotter.generate_orbital_path(factor=2.0, n_points=24, ... shift=0.0, viewup=viewup) >>> plotter.orbit_on_path(orbit, write_frames=True, viewup=viewup, ... step=0.02)
See Orbiting for a full example using this method.