pyvista.transform_vectors_sph_to_cart#

transform_vectors_sph_to_cart(theta, phi, r, u, v, w)[source]#

Transform vectors from spherical (r, phi, theta) to cartesian coordinates (z, y, x).

Note the “reverse” order of arrays’s axes, commonly used in geosciences.

Parameters:
thetaarray_like[float]

Azimuthal angle in degrees [0, 360] of shape (M,).

phiarray_like[float]

Polar (zenith) angle in degrees [0, 180] of shape (N,).

rarray_like[float]

Distance (radius) from the point of origin of shape (P,).

uarray_like[float]

X-component of the vector of shape (P, N, M).

varray_like[float]

Y-component of the vector of shape (P, N, M).

warray_like[float]

Z-component of the vector of shape (P, N, M).

Returns:
u_t, v_t, w_tnumpy.ndarray

Arrays of transformed x-, y-, z-components, respectively.