Skip to main content

Function: cartesianToSpherical()

cartesianToSpherical(vec): Vector3Tuple

Defined in: src/utils/spaceOps.ts:367

Cartesian [x, y, z] to spherical [r, theta, phi] (ManimCE cartesian_to_spherical). theta is the azimuth in the xy-plane, phi is the polar angle from +z.

Parameters​

vec​

number[]

Returns​

Vector3Tuple