Module Scientific.Geometry

This subpackage contains classes that deal with geometrical quantities and objects. The geometrical quantities are vectors and tensors, transformations, and quaternions as descriptions of rotations. There are also tensor fields, which were included here (rather than in the subpackage Scientific.Functions) because they are most often used in a geometric context. Finally, there are classes for elementary geometrical objects such as spheres and planes.

Submodules:


Class Tensor: Tensor in 3D space

Constructor: Tensor([[xx, xy, xz], [yx, yy, yz], [zx, zy, zz]])

Tensors support the usual arithmetic operations (t1, t2: tensors, v: vector, s: scalar):

The coordinates can be extracted by indexing; a tensor of rank N can be indexed like an array of dimension N.

Tensors are immutable, i.e. their elements cannot be changed.

Tensor elements can be any objects on which the standard arithmetic operations are defined. However, eigenvalue calculation is supported only for float elements.

Methods:

Class Vector: Vector in 3D space

Constructor:

Vectors support the usual arithmetic operations (v1, v2: vectors, s: scalar):

The three coordinates can be extracted by indexing.

Vectors are immutable, i.e. their elements cannot be changed.

Vector elements can be any objects on which the standard arithmetic operations plus the functions sqrt and arccos are defined.

Methods: