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&#39;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-&gt;SetInput(grid);<br clear="all">tracer-&gt;SetStartPosition(x,y,z);<br>tracer-&gt;SetIntegratorTypeToRungeKutta4();<br>tracer-&gt;SetMaxPropagation(int);<br>tracer-&gt;SetInitialIntegrationStep(int);<br><br>
points-&gt;SetInputConnection(tracer-&gt;GetOutputPort());<br>points-&gt;SetStartPosition(x,y,z);<br>points-&gt;SetMaxPropagationTime(100);<br>points-&gt;SetTimeIncrement(150);<br>points-&gt;SetIntegrationDirectionToForward();<br>
<br>sphere-&gt;SetRadius(5.0);<br><br>glyph-&gt;SetInputConnection(points-&gt;GetOutputPort());<br>glyph-&gt;SetSource(sphere-&gt;GetOutput());<br>glyph-&gt;SetScaleFactor(1.0);<br>glyph-&gt;SetScaleModeToScaleByVector();<br>
<br>mapper-&gt;SetInputConnection(glyph-&gt;GetOutputPort());<br><br>please ignore any syntax errors.<br><br>do tell me if there&#39;s anything wrong with the algorithm or order of commands, or the logic involved, because that&#39;s where I believe the problem may lie. but obviously if there&#39;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 &amp; 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>