[vtkusers] Problem with streamline
Mohammad Nazrul Islam
int64380 at stud.uni-stuttgart.de
Wed Feb 6 13:10:34 EST 2008
Hi all.
I have position vector file and i want to use these to plot a streamline and using this code but not getting result.Please help me to find the problem in the following 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 anybody help me?
Thanks and br,
Nazrul
More information about the vtkusers
mailing list