Smooth interpolation from a bunch of transformation matrices
Hello,
I was wondering what is the easiest way in Vizard 3.0 to do a smooth view interpolation if I have a bunch of 4x4 transformation matrices stored in a text file. On a similar token, is there any sample code/example that comes with vizard that illustrates quaternion usage? Thanks, Vijay. |
You can use the vizmat.Interpolate function to linearly interpolate between the position values of the matrix:
Code:
pos = vizmat.Interpolate(pos1,pos2,0.5) Code:
quat = vizmat.slerp(quat1,quat2,0.5) |
farshizzo,
Thanks for the reply. I was sort of looking for this, but I would need to extract the position and quat info before using them. Given a 4 x 4 transformation matrix, are there any routines that directly extracts the 'pos' and 'quat'? Thanks, Vijay. |
If you have a list of 16 values representing the 4x4 matrix, then you can initialize a viz.Matrix object with it:
Code:
matrix_data = [1,2,3,...,16] # 4x4 matrix values |
All times are GMT -7. The time now is 11:39 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC