sample_over_circular_arc_normal

RectilinearGrid.sample_over_circular_arc_normal(center, resolution=None, normal=None, polar=None, angle=None, tolerance=None, progress_bar=False)

Sample a dataset over a circular arc defined by a normal and polar vector and plot it.

The number of segments composing the polyline is controlled by setting the object resolution.

Parameters
centernp.ndarray or list

Location in [x, y, z].

resolutionint, optional

Number of pieces to divide circular arc into. Defaults to number of cells in the input mesh. Must be a positive integer.

normalnp.ndarray or list, optional

The normal vector to the plane of the arc. By default it points in the positive Z direction.

polarnp.ndarray or list, optional

Starting point of the arc in polar coordinates. By default it is the unit vector in the positive x direction.

anglefloat, optional

Arc length (in degrees), beginning at the polar vector. The direction is counterclockwise. By default it is 360.

tolerancefloat, optional

Tolerance used to compute whether a point in the source is in a cell of the input. If not given, tolerance is automatically generated.

progress_barbool, optional

Display a progress bar to indicate progress.

Returns
pyvista.PolyData

Sampled Dataset.

Examples

Sample a dataset over a circular arc.

>>> import pyvista
>>> from pyvista import examples
>>> uniform = examples.load_uniform()
>>> uniform["height"] = uniform.points[:, 2]
>>> normal = [0, 0, 1]
>>> polar = [0, 9, 0]
>>> center = [uniform.bounds[1], uniform.bounds[2], uniform.bounds[5]]
>>> arc = uniform.sample_over_circular_arc_normal(center, normal=normal,
...                                               polar=polar)
>>> pl = pyvista.Plotter()
>>> _ = pl.add_mesh(uniform, style='wireframe')
>>> _ = pl.add_mesh(arc, line_width=10)
>>> pl.show_axes()
>>> pl.show()
../../../_images/pyvista-RectilinearGrid-sample_over_circular_arc_normal-1_00_00.png