<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:courier, monaco, monospace, sans-serif;font-size:12pt"><DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">
<DIV>Hey,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I'm trying to use the vtkTransformInterpolator in python, but when I try to add transforms without rotation the interpolator returns transforms with messed up rotations </DIV>
<DIV>&nbsp;</DIV>
<DIV>ex.</DIV>
<DIV><FONT face="courier, monaco, monospace, sans-serif">C:\Program Files\Windows Resource Kits\Tools&gt;python<BR>Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] on win32<BR>Type "help", "copyright", "credits" or "license" for more information.<BR>&gt;&gt;&gt; from vtk import*<BR>&gt;&gt;&gt; t=vtkTransformInterpolator()<BR>&gt;&gt;&gt; transform=vtkTransform()<BR>&gt;&gt;&gt; transform.Translate(10,0,0)<BR>&gt;&gt;&gt; t.AddTransform(0, vtkTransform())<BR>&gt;&gt;&gt; t.AddTransform(10, transform)<BR>&gt;&gt;&gt; tOut = vtkTransform()<BR>&gt;&gt;&gt; t.InterpolateTransform(5, tOut)<BR>&gt;&gt;&gt; print tOut<BR>vtkTransform (00A4FB18)<BR>&nbsp; Debug: Off<BR>&nbsp; Modified Time: 526<BR>&nbsp; Reference Count: 2<BR>&nbsp; Registered Events: (none)<BR>&nbsp; Inverse: (00000000)<BR>&nbsp; Matrix: (012611A0)<BR>&nbsp;&nbsp;&nbsp; Debug: Off<BR>&nbsp;&nbsp;&nbsp; Modified Time: 527<BR>&nbsp;&nbsp;&nbsp; Reference Count: 1<BR>&nbsp;&nbsp;&nbsp; Registered
 Events: (none)<BR>&nbsp;&nbsp;&nbsp; Elements:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -1.#IND -1.#IND -1.#IND 0.5<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -1.#IND -1.#IND -1.#IND 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -1.#IND -1.#IND -1.#IND 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -1.#IND -1.#IND -1.#IND 1<BR>&nbsp; Input: (00000000)<BR>&nbsp; InverseFlag: 0<BR>&nbsp; NumberOfConcatenatedTransforms: 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0: vtkSimpleTransform at 0126FC18<BR>&nbsp; DoublePoint: ( 0, 0, 0, 0)<BR>&nbsp; Point: ( 0, 0, 0, 0)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>In this example the translation is also off.&nbsp; </DIV>
<DIV>&nbsp;</DIV>
<DIV>As well, when I try to set a small rotation at the start to avoid this problem, there are still some combinations of rotations and translations that return matrices similar to the one in the example I posted.</DIV>
<DIV>Any ideas as to what's going on with the interpolator?</DIV>
<DIV>Thanks!</DIV>
<DIV>-Arwen</DIV></DIV>
<DIV></DIV></div><br>


        
                <hr size=1>Make free worldwide PC-to-PC calls. Try the new <a href="http://ca.messenger.yahoo.com/"><b>Yahoo! Canada Messenger with Voice</b></a></body></html>