- 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 tempfile >>> import os >>> import pyvista >>> filename = os.path.join(tempfile._get_default_tempdir(), ... next(tempfile._get_candidate_names()) + '.gif') >>> from pyvista import examples >>> 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.