vtkHedgeHog questions
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Sun Apr 30 14:25:50 EDT 2000
hi,
>>>>> "Randall" == Randall Hopper <aa8vb at ipass.net> writes:
Randall> Also, I'm working with CFD data. Is there a way in VTK
Randall> to draw 3D arrows for a vector field? Hedgehog seems to
Randall> draw only directionless lines.
You could use cones or any object that behaves like it. Here
is a code snippet.
--
vecreader = vtkStructuredGridReader ()
vecreader.SetFileName (file)
vecreader.Update ()
cone = vtkConeSource ()
cone.SetResolution (5)
cone.SetHeight (1)
cone.SetRadius (0.25)
cones = vtkGlyph3D ()
cones.SetInput (vecreader.GetOutput ())
cones.SetSource (cone.GetOutput ())
cones.SetScaleFactor (0.02)
cones.SetScaleModeToScaleByVector ()
cones.SetColorModeToColorByVector ()
cones.SetClamping (1)
vectors = vtkPolyDataMapper ()
vectors.SetInput (cones.GetOutput ())
vec_actor = vtkLODActor ()
---
I use this to visualize 3d structured cfd velocity data. The
colouring is useful for it helps to differentiate the data. You could
the vtkThresholdPoints class or the vtkMaskPoints classes to reduce
the number of data points you plot. Ref. page 202 of the VTK book
(2nd Ed.)
prabhu
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------
More information about the vtkusers
mailing list