<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Great, Berk!
<br>In addition, if you want the tails of the vectors to start at the vertex,
you can use a vtkTransform like this:
<br>(The key is to translate the arrow, then scale the entire glyph)
<p> vtkGlyphSource2D* arrow = vtkGlyphSource2D::New();
<br> arrow->SetGlyphTypeToArrow();
<br> arrow->FilledOff();
<p> vtkTransform trans = vtkTransform()::New();
<br> trans->Identity();
<br> trans->Translate(0.5,0.0,0.0);
<p> vtkGlyph3D glyph = new vtkGlyph3D();
<br> glyph.SetInput(cc.GetOutput());
<br> glyph.SetSource(transFilter.GetOutput());
<br> glyph.SetScaleFactor(0.2);
<br> etc...
<br>
<p>berk.geveci@kitware.com wrote:
<blockquote TYPE=CITE> Jim,
<p> There is a much better way.
Use vtkGlyphSource2D.
<br> (You need to get a nightly
release, this is not in
<br> vtk 3.1.2). Here is a bit
from something I am doing:
<p> vtkGlyphSource2D* arrow = vtkGlyphSource2D::New();
<br> arrow->SetGlyphTypeToArrow();
<br> arrow->SetScale(0.2);
<br> arrow->FilledOff();
<p>// Glyph the gradient vector
<br> vtkGlyph3D* glyph = vtkGlyph3D::New();
<br> glyph->SetInput(fd2ad->GetOutput());
<br> glyph->SetSource(arrow->GetOutput());
<br> glyph->ScalingOff();
<br> glyph->OrientOn();
<br> glyph->SetVectorModeToUseVector();
<br> glyph->SetColorModeToColorByVector();
<p> Berk
<p>On Tue, 12 Dec 2000 harsh@lanl.gov wrote:
<p>>
<br>> Hi,
<br>>
<br>> I'd like to draw arrows to represent a vector field. I can draw a
cone at the
<br>> data point, the size or color representing the vector size; or I
can draw a
<br>> hedgehog, whose length represents the size of the vector; or I can
do both and
<br>> have a cone with a line protuding from the tip of the cone. HOw can
I draw the
<br>> cone at the end of the hedghog to get an arrow?
<br>>
<br>> Thanks,
<br>> Jim
<br>>
<br>>
<br>>
<br>>
<br>> ---------------------------------------------
<br>> Jim Harsh E-Mail: harsh@lanl.gov
<br>> Los Alamos National Laboratory, MS P940
<br>> Los Alamos, NM 87545
<br>> 505-665-0485, FAX - 505-665-3359
<br>> Date: 12-Dec-2000,Time: 15:50:21
<br>> ---------------------------------------------
<br>>
<br>> _______________________________________________
<br>> This is the private VTK discussion list.
<br>> Please keep messages on-topic. Check the FAQ at: <<a href="http://public.kitware.com/cgi-bin/vtkfaq">http://public.kitware.com/cgi-bin/vtkfaq</a>>
<br>> Follow this link to subscribe/unsubscribe:
<br>> <a href="http://public.kitware.com/mailman/listinfo/vtkusers">http://public.kitware.com/mailman/listinfo/vtkusers</a>
<br>>
<p>_______________________________________________
<br>This is the private VTK discussion list.
<br>Please keep messages on-topic. Check the FAQ at: <<a href="http://public.kitware.com/cgi-bin/vtkfaq">http://public.kitware.com/cgi-bin/vtkfaq</a>>
<br>Follow this link to subscribe/unsubscribe:
<br><a href="http://public.kitware.com/mailman/listinfo/vtkusers">http://public.kitware.com/mailman/listinfo/vtkusers</a></blockquote>
<pre>--
J.A. Lee
Software Engineer
Computational Dynamics North America
3 Schoolhouse Lane
Etna NH, 03750
ph: 603-643-9993 x109, fax: 603-643-9994</pre>
</html>