[vtkusers] Re: Streamlines from a FloatArray

Jeff Lee jeff at cdnorthamerica.com
Wed Jul 7 11:13:26 EDT 2004


Hi,
StreamTracer needs 2 things:
1. a valid mesh
2. a valid velocity field

You cannot just give the streamtracer the velocity field - there is no 
way to just integrate without knowing where the velocities are defined.  
You will need to create a vtkDataSet which represents the 
points/connectivity of the mesh from which you obtained your velocity 
field.  Where do you get the velocities from?  Once you have a dataset, 
you can add your velocity array to the dataset's point data via 
dataset->GetPointData()->AddArray(...).  Streamtracer looks at the input 
dataset's point data for a vector data array.
-Jeff

tom fogal wrote:

><OFBED18E15.1239F85E-ONC1256ECA.001C98F2-C1256ECA.001D805F at diamond.philips.com
>  
>
>>ursula.goette at philips.com writes:
>>1. do you also have a spacing for the vector field (points?)
>>    
>>
>
>spacing? I'm not sure I follow you -- are you asking if I have a
>rigid format to the field, as in one reading every 2 'x units', etc ?
>The floatarray is setup to have groups of 3 tuples like:
>
>x0, y0, z0, x1, y1, z1, x2, y2, z2, ...
>
>oh, now that I think about it those are just the strength of the vector
>field at a point, and perhaps you are asking how VTK is to know WHICH
>point to associate that strength with?
>
>  
>
>>2. do you give the stream line (a) source point(s) to start from?
>>    
>>
>
>yes. I've tried the origin and some points around there when I noticed
>that in vtkStreamer::Integrate() it would end up multiplying by the
>start location =)
>
>  
>
>>3. do you set all the other things necessary to create the stream line?
>>
>>Why don't you check out the example file officeTube.tcl. There you
>>can see how to use the filter.
>>    
>>
>
>I believe I set everything correctly. I pretty much copied the relevant
>sections from the officeTube.tcl and then changed the input to come
>from my floatarray -> points -> polydata chain.
>
>Thanks for your help!
>
>-tom
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>  
>



More information about the vtkusers mailing list