grid_from_sph_coords#
- grid_from_sph_coords(
- theta: VectorLikeFloat,
- phi: VectorLikeFloat,
- r: VectorLikeFloat,
Create a structured grid from arrays of spherical coordinates.
- Parameters:
- theta
VectorLikeFloat Azimuthal angle in degrees
[0, 360].- phi
VectorLikeFloat Polar (zenith) angle in degrees
[0, 180].- r
VectorLikeFloat Distance (radius) from the point of origin.
- theta
- Returns:
pyvista.StructuredGridStructured grid.
Notes#
The returned grid has no point normals. Warping it with
warp_by_scalar() therefore moves every point
along a single fixed direction rather than radially outward – see that
filter’s notes. For a radial warp, use
warp_by_vector() with the (normalized) point
coordinates as the vector array instead.
Used In#
Gallery Examples