Vectors and Vector Arrays

bewegung offers vectors and vector arrays. Both of them are available in 2D and 3D variants. Both vectors and vector arrays can interact with each other as well as with matrices.

Note

Besides simple vector algebra, a lot of bewegung’s functions and methods expect geometric input using vector objects.

Vector Classes

The vector classes describe individual vectors in 2D and 3D space. Vectors are “statically typed”, i.e. all components are of one single type, and use Python number types (sub-classes of numbers.Number). The data type of a vector is exposed through its dtype property.

The Vector base class

The Vector2D class

The Vector3D class

Vector Array Classes

The vector array classes describe arrays of individual vectors in 2D and 3D space. Vector arrays are “statically typed” and use numpy arrays for storing data. Just like numpy.ndarray objects, they expose a dtype property.

The VectorArray base class

The VectorArray2D class

The VectorArray3D class