Hello all,<br>
<br>
I am trying to visualize vector data using vtkglyph3D with an arrow
source.  However, I am having problems with the orienation of the
arrows.  They are only orientated correctly if placed at
(0,0,0).  If I want to place ar arrow with tail at (10,10,0) and
head at (17,7,0) it is not pointing in the right direction.  The
arrow does not even pass though the horizontal.  Below is some
code.  Any help is much appreciated.<br>
<br>
pts = vtkPoints()<br>
pts.num = 4<br>
pts.x = [10,10,10,10]<br>
pts.y = [10,10,10,10]<br>
pts.z = [0, 0, 0, 0]<br>
<br>
pt = vtkPoints()<br>
for i in range(0,pts.num):<br>
    pt.InsertNextPoint(pts.x[i],pts.y[i],pts.z[i])<br>
<br>
pts2 = vtkPoints()<br>
pts2.num = 4<br>
pts2.x = [17,17,13,7]<br>
pts2.y = [13,7,17,17]<br>
pts2.z = pts.z<br>
<br>
vectors = vtkFloatArray()<br>
vectors.SetNumberOfTuples(4)<br>
vectors.SetNumberOfComponents(3)<br>
vectors.SetComponent(0,0,pts2.x[0])<br>
vectors.SetComponent(0,1,pts2.y[0])<br>
vectors.SetComponent(0,2,pts2.z[0])<br>
... for the other pts2<br>
<br>
base = vtkPolyData()<br>
base.SetPoints(pt)<br>
base.GetPointData().SetVectors(vectors)<br>
<br>
arrow = vtkArrowSource()<br>
<br>
glyph = vtkGlyph3D()<br>
glyph.SetInput(base)<br>
glyph.SetSource(arrow.GetOutput())<br>
glyph.SetVectorModeToUseVector()<br>
<br>
Much Thanks,<br>
Brandi<br>