and your error might be the BuildCells() . you havent created a CellArray for the PolyData .<br><br><div class="gmail_quote">On Mon, Jul 26, 2010 at 7:10 AM, Markus Ott <span dir="ltr"><<a href="mailto:ott-markus@t-online.de">ott-markus@t-online.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Thanks Eric, this sounds great.<br>
<br>
I tried it but think i made a mistake somewhere.<br>
Does anybody see my error? (Java snippet below)<br>
<br>
points = new vtkPoints();<br>
<br>
double origin[] = {0.0, 0.3, 0.1};<br>
double p0[] = {1.0, 0.5, 0.8};<br>
double p1[] = {0.3, 0.4, 0.7};<br>
double p2[] = {0.4, 0.2, 0.2};<br>
double p3[] = {0.4, 0.8, 0.3};<br>
<br>
points.InsertNextPoint(origin);<br>
points.InsertNextPoint(p0);<br>
points.InsertNextPoint(p1);<br>
points.InsertNextPoint(p2);<br>
points.InsertNextPoint(p3);<br>
<br>
polyData = new vtkPolyData();<br>
polyData.SetPoints(points);<br>
polyData.BuildCells();<br>
<br>
path = new vtkTemporalPathLineFilter();<br>
path.UsePointIndexForIdsOn();<br>
path.SetInput(polyData);<br>
<br>
<br>
vtkPolyDataMapper mapper = new vtkPolyDataMapper();<br>
mapper.SetInputConnection(path.GetOutputPort());<br>
<br>
traceActor = new vtkActor();<br>
traceActor.SetMapper(mapper);<br>
traceActor.VisibilityOn();<br>
<br>
VisualizationPanel.getInstance().addActor(traceActor);<br>
<br>
Eric E. Monson schrieb:<br>
<div><div></div><div class="h5">> Hey Markus,<br>
><br>
> I don't know if this will quite work for your application, but in case you didn't know about it, there is the vtkTemporalPathLineFilter:<br>
><br>
> <a href="http://www.vtk.org/doc/nightly/html/classvtkTemporalPathLineFilter.html" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkTemporalPathLineFilter.html</a><br>
><br>
> I haven't looked through the code, but it may help with your methods. I use it in ParaView all the time to trace out particle paths in time-dependent data sets.<br>
><br>
> -Eric<br>
><br>
> ------------------------------------------------------<br>
> Eric E Monson<br>
> Duke Visualization Technology Group<br>
><br>
><br>
> On Jul 26, 2010, at 10:15 AM, Markus Ott wrote:<br>
><br>
>> Hi vtkusers.<br>
>><br>
>> What i want to do is some kind of real time position tracing. An object<br>
>> moves through 3d space and I want to trace this movement with a line.<br>
>><br>
>> I read the polyline example<br>
>> (<a href="http://vtk.org/Wiki/VTK/Examples/GeometricObjects/Display/PolyLine" target="_blank">http://vtk.org/Wiki/VTK/Examples/GeometricObjects/Display/PolyLine</a>)<br>
>><br>
>> I need to dynamically add new points to the line in real time and show<br>
>> the changes immediately.<br>
>><br>
>> In the example the positions are already known before creating the line.<br>
>> How can i update this polyline, add new points and show the changes as<br>
>> the line updates?<br>
>><br>
>> Another thing: If I add more and more points the line will have too much<br>
>> points eventually. Can i filter out not needed points to keep the<br>
>> polydata simple?<br>
>><br>
>> Regards,<br>
>> Markus<br>
>> _______________________________________________<br>
>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>><br>
>> Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
><br>
><br>
><br>
><br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br>