openalea.phenomenal.calibration.frame.Frame
- class openalea.phenomenal.calibration.frame.Frame(axes=None, origin=None)[source]
Bases:
object
A helping class to deal with change of referential in 3D space.
- __init__(axes=None, origin=None)[source]
Constructor
Construct a new orthonormal Frame default is the canonical one.
- Parameters:
- axes ([array,array,array]) - orientation of axes each array is
the coordinate of the local axis in the global frame
- origin (array) - position of the origin of this frame
in the global frame
Methods
__init__
([axes, origin])Constructor
axis
(i)Return the coordinates of the ith axis of the frame
global_point
(point)Global coordinates of a local point
global_tensor
(tensor)Global coordinates of a local tensor
global_tensor2
(tensor)Global coordinates of a local tensor
global_vec
(vec)Global coordinates of a local vector
local_point
(point)Local coordinates of a global point
local_tensor
(tensor)Local coordinates of a global tensor
local_tensor2
(tensor)Local coordinates of a global tensor expressed in the local plane Ox,Oy
local_vec
(vec)Local coordinates of a global vector
origin
()Origin of this frame
Return the inverse rotation associated with this frame
Return the rotation associated with this frame
- global_point(point)[source]
Global coordinates of a local point
- Parameters:
point (float,float,float) - a position in the local frame
- Returns Type:
array
- global_tensor(tensor)[source]
Global coordinates of a local tensor
- Parameters:
tensor (3x3 array) - tensor expressed in local coordinates
- Returns Type:
3x3 array
- global_tensor2(tensor)[source]
Global coordinates of a local tensor
Warning
use this function only if the third axis of the frame is colinear to the third axis of the global frame.
- Parameters:
tensor (array) - tensor expressed in local coordinates
- Returns Type:
array
- global_vec(vec)[source]
Global coordinates of a local vector
- Parameters:
vec (float,float,float) - a vector in the local frame
- Returns Type:
array
- local_point(point)[source]
Local coordinates of a global point
- Parameters:
point (float,float,float) - a position in the global frame
- Returns Type:
array
- local_tensor(tensor)[source]
Local coordinates of a global tensor
- Parameters:
tensor (3x3 array) - tensor expressed in global coordinates
- Returns Type:
3x3 array
- local_tensor2(tensor)[source]
Local coordinates of a global tensor expressed in the local plane Ox,Oy
Warning
use this function only if the third axis of the frame is colinear to the third axis of the global frame.
- Parameters:
tensor (array) - tensor expressed in global coordinates
- Returns Type:
array
- local_vec(vec)[source]
Local coordinates of a global vector
- Parameters:
vec (float,float,float) - a (array of) vector in the global frame
- Returns Type:
array