Reference fromAngles()

fromAngles()

Creates a new 3D vector from a pair of ISO spherical angles.

Examples

Syntax

fromAngles(theta, phi, [length])

Parameters

theta

polar angle in radians (zero is up).

phi

azimuthal angle in radians (zero is out of the screen).

length

length of the new vector (defaults to 1).

Notice any errors or typos? Please let us know. Please feel free to edit src/math/p5.Vector.js and open a pull request!

Related References