Vectors support the usual arithmetic operations ('v1', 'v2': vectors,
's': scalar):
The three coordinates can be extracted by indexing.
Vector elements can be any objects on which the standard arithmetic
operations plus the functions sqrt and arccos are defined.
|
|
|
|
|
__copy__(self,
memo=None) |
|
|
|
__deepcopy__(self,
memo=None) |
|
|
|
|
|
|
|
|
|
__init__(self,
x=None,
y=None,
z=None)
There are two supported calling patterns: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__setstate__(self,
state) |
|
|
|
|
|
|
float
|
angle(self,
other)
Returns:
the angle to other |
|
|
Scientific.Geometry.Tensor
|
asTensor(self)
Returns:
an equivalent rank-1 tensor object |
|
|
Vector
|
cross(self,
other)
Returns:
cross product with other |
|
|
Scientific.Geometry.Tensor
|
dyadicProduct(self,
other)
Returns:
the dyadic product with other |
|
|
type of vector elements
|
length(self)
Returns:
the length (norm) of the vector |
|
|
Vector
|
normal(self)
Returns:
a normalized (length 1) copy of the vector |
|
|
type of vector elements
|
x(self)
Returns:
the x coordinate |
|
|
type of vector elements
|
y(self)
Returns:
the y coordinate |
|
|
type of vector elements
|
z(self)
Returns:
the z coordinate |
|
|