[vtkusers] Problem with streamline

Mohammad Nazrul Islam int64380 at stud.uni-stuttgart.de
Tue Feb 5 13:54:44 EST 2008


Hi Amy,
Thank you very much for your reply. I have passed the unstructured grid to streamline but no results. I am sending you the code :

 vector=vtk.vtkFloatArray()
 vector.SetNumberOfComponents(3)
 vector.SetNumberOfTuples(lines)
 
 slineGrid=vtk.vtkUnstructuredGrid()
 slineGrid.SetPoints(points)
 slineGrid.GetPointData().SetVectors(vector)

 delny = vtk.vtkDelaunay3D()
 delny.SetInput(slineGrid)
 delny.SetTolerance(0.1)
 delny.SetAlpha(0.5)
 delny.BoundingTriangulationOff()
 
 line=vtk.vtkLineSource()
 line.SetResolution(25)

 integ=vtk.vtkRungeKutta4()
 streamline=vtk.vtkStreamTracer()
 streamline.SetInputConnection(delny.GetOutputPort()) 
 streamline.SetSource(line.GetOutput())
 streamline.SetMaximumPropagation(500)
 streamline.SetMaximumPropagationUnitToTimeUnit()
 streamline.SetInitialIntegrationStep(0.5)
 streamline.SetInitialIntegrationStepUnitToCellLengthUnit()
 streamline.SetIntegrationDirectionToBoth()
 streamline.SetIntegrator(integ)


 and then mapper, actor and rendering stuff. Could you pls help me more?

Thanks and br,
Nazrul 



---------- Original Message ----------------------------------
From: Amy Squillacote <ahs at cfdrc.com>
Date:  Tue, 05 Feb 2008 12:39:14 -0600

>Hi Nazrul,
>
>You need cells (connectivity) in addition to point coordinates and 
>vectors in order to generate streamlines. Try passing your unstructured 
>grid through the vtkDelaunay3D filter. Then you should be able to 
>compute streamlines on the result.
>
>- Amy
>
>Mohammad Nazrul Islam wrote:
>> Hi all,
>> I have unstructured Grid which i have found from x, y, z coordinates or position vector file.I can plot sphere, glyph using this Unstructured Grid but I want plot a streamline.
>>
>> Could anybody help?
>>
>> Thank in advance
>>
>> Nazrul
>> _______________________________________________
>> This is the private VTK discussion list. 
>> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>>   
>
>-- 
>Amy Squillacote                    Phone: (256) 726-4839
>Computer Scientist                 Fax: (256) 726-4806
>CDF Research Corporation           Web: http://www.cfdrc.com
>215 Wynn Drive, Suite 501
>Huntsville, AL  35805
>
>
>



More information about the vtkusers mailing list