| Home | Trees | Indices | Help |
|
|---|
|
|
|
|||
|
rotax(a,
b,
tau,
transpose=1) Build 4x4 matrix of clockwise rotation about axis a-->b by angle tau (radians). |
||
|
rotVectToVect(vect1,
vect2,
i=None) returns a 4x4 transformation that will align vect1 with vect2 vect1 and vect2 can be any vector (non-normalized) |
||
|
mat_to_quat(matrix,
transpose=1) takes a four by four matrix (optionally with shape (16,) and converts it into the axis of rotation and angle to rotate by (x,y,z,theta). |
||
|
inverse4X4(matrix) returns the inverse of the given 4x4 transformation matrix t_1: the negetive of Translation vector r_1: the inverse of rotation matrix |
||
|
mat_to_axis_angle(matrix) ... |
||
|
interpolate3DTransform(matrixList,
indexList,
percent) This function gets input of two list and a percent value. |
||
| interpolate3DTransform1(matrixList, indexList, percent) | ||
|
_interpolateMat(mat,
percent) called only by interpolate3DTransform() |
||
|
|||
|
degtorad = 0.017453292519943295
|
||
|
|||
|
|
|
returns the inverse of the given 4x4 transformation matrix t_1: the negetive of Translation vector r_1: the inverse of rotation matrix inversed transformation is 1) t_1 applied first 2) then r_1 is applied to validate the result, N.matrixmultiply(matrix, mat_inverse)==N.identity(4,'f') |
NOTE: This function is added by Yong 2/01/04: given a 4x4 transformation
matrix of hinge motion, now returns the rotation angle and axis (defined by
vector and a point) Please be noticed that if the motion is not hinge, the
function will complain and return none
|
This function gets input of two list and a percent value.
Return value is a 4x4 matrix corresponding to percent% of the transformation.
matrixList: a list of 4x4 transformation matrix
indexList : a list of sorted index (positive float number)
percent : a positive float number.
if only one matrix in the matrix list:
percent = 0.0 means no transformation (identity)
1.0 means 100% of the transformation (returns mat)
0.58 means 58% of translation and rotatetion 58% of rotation angle
along the same rotation axis
percent can go above 1.0
If matrixList has more than one matrix:
matrixList=[M1, M2, M3] #Attention: All M uses the same reference frame
indexList =[0.2, 0.5, 1.0] #Attention: assume the list sorted ascendingly
p = 0.5 means apply M2
p = 0.8 means apply M3
p = 0.9 means apply M2 first, then apply 50% of M'. M' is the transformation
from M2 to M3. 50% = (0.9-0.8) / (1.0-0.8)
M2 x M' = M3
--> M2.inverse x M2 x M'= M2.inverse x M3
--> M'= M2.inverse x M
|
|
|
|
|||
degtoradNone
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0alpha3 on Fri Nov 2 14:06:01 2007 | http://epydoc.sourceforge.net |