<!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 a simple arrow head. For example:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>vtkCylinderSource cyl<BR> #cyl
SetResolution 10 ;# for complex arrows<BR> cyl SetResolution
1<BR> cyl SetRadius .02<BR> cyl SetHeight
2</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>vtkTransform cylTrans<BR>
cylTrans Identity<BR> cylTrans RotateZ
90<BR> cylTrans Translate 0 -1.0 0</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>vtkTransformPolyDataFilter
cylTransFilter<BR> cylTransFilter SetInput [cyl GetOutput
]<BR> cylTransFilter SetTransform cylTrans</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>vtkConeSource cone<BR> #cone
SetResolution 10 ;# for complex arrows<BR> cone
SetResolution 2<BR>vtkTransform coneTrans<BR> coneTrans
Identity<BR> coneTrans Translate 2.5 0
0<BR>vtkTransformPolyDataFilter coneTransFilter<BR>
coneTransFilter SetInput [cone GetOutput ]<BR> coneTransFilter
SetTransform coneTrans</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>vtkAppendPolyData arrow<BR> arrow
AddInput [cylTransFilter GetOutput ]<BR> arrow AddInput
[coneTransFilter GetOutput]<BR> arrow Update<BR>vtkGlyph3D
arrows<BR> arrows SetInput [reader
GetOutput]<BR> arrows SetSource [arrow
GetOutput]<BR> arrows SetScaleFactor
$vscale<BR> arrows
SetScaleModeToScaleByVector<BR>vtkLookupTable lut<BR> lut
SetHueRange .667 0.0<BR> lut Build<BR>vtkPolyDataMapper
vecMapper<BR> vecMapper SetInput [arrows
GetOutput]<BR> vecMapper SetScalarRange $minv
$maxv<BR> vecMapper SetLookupTable lut<BR>vtkActor
vecActor<BR> vecActor SetMapper vecMapper</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2># for simple arrows<BR>
[vecActor GetProperty] SetRepresentationToWireframe<BR>
[vecActor GetProperty] SetAmbient 1<BR> [vecActor GetProperty]
SetDiffuse 0<BR> [vecActor GetProperty] SetSpecular
0</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2># for complex arrows</FONT></DIV>
<DIV><FONT face=Arial size=2> # [vecActor GetProperty]
SetRepresentationToSurface</FONT></DIV>
<DIV><FONT face=Arial size=2># [vecActor GetProperty]
SetAmbient 0<BR> # [vecActor GetProperty]
SetDiffuse 1<BR> # [vecActor GetProperty] SetSpecular
0</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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> </DIV>
<DIV><FONT face=Arial size=2>-sjr</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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> </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> </DIV>
<DIV><FONT size=2>Any ideas??</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Thanks</FONT></DIV>
<DIV><FONT size=2>Simon</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>================================<BR>S.D.Bulman.<BR>Senior
Research Officer.<BR>University of Wales Swansea.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2><A
href="mailto:S.D.Bulman@swansea.ac.uk">S.D.Bulman@swansea.ac.uk</A></FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>(W) +44 (0)1792 513179<BR>(H) +44 (0)1792
511144<BR>================================<BR></FONT></DIV></BLOCKQUOTE></BODY></HTML>