<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 5.50.4207.2601" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>If you don't want just the line produced by 
vtkHedgeHog and want a complete arrow you can join a cylinder and cone using 
vtkAppendPolyData before putting it through vktGlyph3D. You can change the 
appearance (lines vs surfaces) by adjusting the parameters of the cone and 
cylinder and setting the representation to wireframe or surface. Setting the 
cone resolution to 2 just gives two orthogonal triangles that are useful 
for&nbsp;a simple&nbsp;arrow head. For example:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>vtkCylinderSource cyl<BR>&nbsp;&nbsp;&nbsp; #cyl 
SetResolution 10 ;# for complex arrows<BR>&nbsp;&nbsp;&nbsp; cyl SetResolution 
1<BR>&nbsp;&nbsp;&nbsp; cyl SetRadius .02<BR>&nbsp;&nbsp;&nbsp; cyl SetHeight 
2</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>vtkTransform cylTrans<BR>&nbsp;&nbsp;&nbsp; 
cylTrans Identity<BR>&nbsp;&nbsp;&nbsp; cylTrans RotateZ&nbsp; 
90<BR>&nbsp;&nbsp;&nbsp; cylTrans Translate&nbsp; 0 -1.0 0</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>vtkTransformPolyDataFilter 
cylTransFilter<BR>&nbsp;&nbsp;&nbsp; cylTransFilter SetInput [cyl GetOutput 
]<BR>&nbsp;&nbsp;&nbsp; cylTransFilter SetTransform cylTrans</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>vtkConeSource cone<BR>&nbsp;&nbsp;&nbsp; #cone 
SetResolution 10&nbsp; ;# for complex arrows<BR>&nbsp;&nbsp;&nbsp; cone 
SetResolution 2<BR>vtkTransform coneTrans<BR>&nbsp;&nbsp;&nbsp; coneTrans 
Identity<BR>&nbsp;&nbsp;&nbsp; coneTrans Translate&nbsp; 2.5 0 
0<BR>vtkTransformPolyDataFilter coneTransFilter<BR>&nbsp;&nbsp;&nbsp; 
coneTransFilter SetInput [cone GetOutput ]<BR>&nbsp;&nbsp;&nbsp; coneTransFilter 
SetTransform coneTrans</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>vtkAppendPolyData arrow<BR>&nbsp;&nbsp;&nbsp; arrow 
AddInput [cylTransFilter GetOutput ]<BR>&nbsp;&nbsp;&nbsp; arrow AddInput 
[coneTransFilter GetOutput]<BR>&nbsp;&nbsp;&nbsp; arrow Update<BR>vtkGlyph3D 
arrows<BR>&nbsp;&nbsp;&nbsp; arrows SetInput [reader 
GetOutput]<BR>&nbsp;&nbsp;&nbsp; arrows SetSource [arrow 
GetOutput]<BR>&nbsp;&nbsp;&nbsp; arrows SetScaleFactor 
$vscale<BR>&nbsp;&nbsp;&nbsp; arrows 
SetScaleModeToScaleByVector<BR>vtkLookupTable lut<BR>&nbsp;&nbsp;&nbsp; lut 
SetHueRange .667 0.0<BR>&nbsp;&nbsp;&nbsp; lut Build<BR>vtkPolyDataMapper 
vecMapper<BR>&nbsp;&nbsp;&nbsp; vecMapper SetInput [arrows 
GetOutput]<BR>&nbsp;&nbsp;&nbsp; vecMapper SetScalarRange $minv 
$maxv<BR>&nbsp;&nbsp;&nbsp; vecMapper SetLookupTable lut<BR>vtkActor 
vecActor<BR>&nbsp;&nbsp;&nbsp; vecActor SetMapper vecMapper</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#&nbsp;for simple arrows<BR>&nbsp;&nbsp;&nbsp; 
[vecActor GetProperty] SetRepresentationToWireframe<BR>&nbsp;&nbsp;&nbsp; 
[vecActor GetProperty] SetAmbient 1<BR>&nbsp;&nbsp;&nbsp; [vecActor GetProperty] 
SetDiffuse 0<BR>&nbsp;&nbsp;&nbsp; [vecActor GetProperty] SetSpecular 
0</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># for complex arrows</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;#&nbsp;&nbsp; [vecActor GetProperty] 
SetRepresentationToSurface</FONT></DIV>
<DIV><FONT face=Arial size=2>#&nbsp;&nbsp;&nbsp; [vecActor GetProperty] 
SetAmbient&nbsp;0<BR>&nbsp;&nbsp;#&nbsp; [vecActor GetProperty] 
SetDiffuse&nbsp;1<BR>&nbsp;&nbsp;# &nbsp;[vecActor GetProperty] SetSpecular 
0</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I find that ambient lighting is better for the 
simple type of arrows. Hope this helps</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>-sjr</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=S.D.Bulman@swansea.ac.uk href="mailto:S.D.Bulman@swansea.ac.uk">Simon 
  Bulman</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=vtkusers@public.kitware.com 
  href="mailto:vtkusers@public.kitware.com">vtkusers@public.kitware.com</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, April 19, 2001 4:07 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [vtkusers] (no subject)</DIV>
  <DIV><BR></DIV>
  <DIV><FONT size=2>Hi All,</FONT></DIV>
  <DIV><FONT size=2></FONT>&nbsp;</DIV>
  <DIV><FONT size=2>I want to display vector orientation and magnitude using 
  arrows.</FONT></DIV>
  <DIV><FONT size=2>Is there a way to do this. I looked at the vtkHedgeHog class 
  but this seems to draw lines</FONT></DIV>
  <DIV><FONT size=2>only (no arrow tip). The vtkGlmph2D has an arrow but is of 
  course only for 2D where as my</FONT></DIV>
  <DIV><FONT size=2>data is 3D. The vtkGlmph3D can be used with a cone (for 
  example) but I tried this a it looks</FONT></DIV>
  <DIV><FONT size=2>messy to me (unless you use a high resolution for the cone, 
  but this gets slow!)</FONT></DIV>
  <DIV><FONT size=2></FONT>&nbsp;</DIV>
  <DIV><FONT size=2>Any ideas??</FONT></DIV>
  <DIV><FONT size=2></FONT>&nbsp;</DIV>
  <DIV><FONT size=2>Thanks</FONT></DIV>
  <DIV><FONT size=2>Simon</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2>================================<BR>S.D.Bulman.<BR>Senior 
  Research Officer.<BR>University of Wales Swansea.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2><A 
  href="mailto:S.D.Bulman@swansea.ac.uk">S.D.Bulman@swansea.ac.uk</A></FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2>(W) +44 (0)1792 513179<BR>(H)&nbsp; +44 (0)1792 
  511144<BR>================================<BR></FONT></DIV></BLOCKQUOTE></BODY></HTML>