Hi,<br><br>A few days back I started using vtkStreamPoints so as to generate points along a streamline to obtain a visual effect of moving particles, but somehow the functions of this class don't seem to be working properly.<br>
<br>Following is a small snippet of the code that I am working on...<br><br>vtkUnstructuredGrid *grid;<br>vtkStreamTracer *tracer;<br>vtkStreamPoints *points;<br>vtkSphereSource *sphere;<br>vtkGlyph3D *glyph;<br>vtkPolyDataMapper *mapper;<br>
<br>tracer->SetInput(grid);<br clear="all">tracer->SetStartPosition(x,y,z);<br>tracer->SetIntegratorTypeToRungeKutta4();<br>tracer->SetMaxPropagation(int);<br>tracer->SetInitialIntegrationStep(int);<br><br>
points->SetInputConnection(tracer->GetOutputPort());<br>points->SetStartPosition(x,y,z);<br>points->SetMaxPropagationTime(100);<br>points->SetTimeIncrement(150);<br>points->SetIntegrationDirectionToForward();<br>
<br>sphere->SetRadius(5.0);<br><br>glyph->SetInputConnection(points->GetOutputPort());<br>glyph->SetSource(sphere->GetOutput());<br>glyph->SetScaleFactor(1.0);<br>glyph->SetScaleModeToScaleByVector();<br>
<br>mapper->SetInputConnection(glyph->GetOutputPort());<br><br>please ignore any syntax errors.<br><br>do tell me if there's anything wrong with the algorithm or order of commands, or the logic involved, because that's where I believe the problem may lie. but obviously if there's anything else wrong with the above code snippet, please do let me know<br>
<br>Thanx,<br>Regards,<br><br>-- <br>Subhodeep Ray<br>Research Engineer (Software Development)<br>Fluidyn Software & Consultancy (P) Ltd.<br>Bangalore.<br>Mobile: +91-9590669291<br>e-mail: <a href="mailto:raysubho510@gmail.com" target="_blank">raysubho510@gmail.com</a><br>
<br>