pyvista.DataSetFilters.streamlines#
- DataSetFilters.streamlines(
 - vectors: str | None = None,
 - source_center: VectorLike[float] | None = None,
 - source_radius: float | None = None,
 - n_points: int = 100,
 - start_position: VectorLike[float] | None = None,
 - return_source: bool = False,
 - pointa: VectorLike[float] | None = None,
 - pointb: VectorLike[float] | None = None,
 - progress_bar: bool = False,
 - **kwargs,
 Integrate a vector field to generate streamlines.
The default behavior uses a sphere as the source - set its location and radius via the
source_centerandsource_radiuskeyword arguments.n_pointsdefines the number of starting points on the sphere surface. Alternatively, a line source can be used by specifyingpointaandpointb.n_pointsagain defines the number of points on the line.You can retrieve the source by specifying
return_source=True.Optional keyword parameters from
pyvista.DataSetFilters.streamlines_from_source()can be used here to control the generation of streamlines.- Parameters:
 - vectors
str,optional The string name of the active vector field to integrate across.
- source_centersequence[
float],optional Length 3 tuple of floats defining the center of the source particles. Defaults to the center of the dataset.
- source_radius
float,optional Float radius of the source particle cloud. Defaults to one-tenth of the diagonal of the dataset’s spatial extent.
- n_points
int, default: 100 Number of particles present in source sphere or line.
- start_positionsequence[
float],optional A single point. This will override the sphere point source.
- return_sourcebool, default: 
False Return the source particles as
pyvista.PolyDataas well as the streamlines. This will be the second value returned ifTrue.- pointa, pointbsequence[
float],optional The coordinates of a start and end point for a line source. This will override the sphere and start_position point source.
- progress_barbool, default: 
False Display a progress bar to indicate progress.
- **kwargs
dict,optional 
- vectors
 - Returns:
 - streamlines
pyvista.PolyData This produces polylines as the output, with each cell (i.e., polyline) representing a streamline. The attribute values associated with each streamline are stored in the cell data, whereas those associated with streamline-points are stored in the point data.
- source
pyvista.PolyData The points of the source are the seed points for the streamlines. Only returned if
return_source=True.
- streamlines
 
Examples
See the Streamlines example.