<meta http-equiv="content-type" content="text/html; charset=utf-8"><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>Gah! This is wrong. That is not the way do things. You should start<br>
with the same input each time, and just have some "distance" parameter<br>
that changes each time.<br>
<br>
In VTK, you should always keep the basic pipeline structure intact<br>
whenever possible.<br>
<br>
This is also about understanding how animation is done. Animation is<br>
not done by "moving all the vertices from the previous position, to<br>
the current position". Or at least that isn't how it is done in<br>
serious software.<br>
<br>
Animation is done by defining a "path" for each of the object that you<br>
want to animate. For rigid objects, the "path" is defined by the<br>
position and orientation of the object at each point in time. For<br>
non-rigid objects, you will use a larger number of parameters than<br>
just position/orientation. For your example, computing the position<br>
is trivial.<br>
<br>
To animate an object, you look at the path and say "at time 't', the<br>
object will be at position 'p'" and then you draw the object at that<br>
position. By doing animation this way, you can easily do things like<br>
draw an object with more detail when it is closer to the camera.<br>
<br>
So please, please, please change the example.<br>
<div class="im"></div></blockquote></div><br></div><div>Gotcha. All fixed: <span class="Apple-style-span" style="font-family: sans-serif; font-size: 15px; border-collapse: collapse; line-height: 22px; "><a href="http://www.vtk.org/Wiki/VTK/Examples/Utilities/DataAnimation">http://www.vtk.org/Wiki/VTK/Examples/Utilities/DataAnimation</a></span></div>
<div><span class="Apple-style-span" style="font-family: sans-serif; font-size: 15px; border-collapse: collapse; line-height: 22px; "><br></span></div><div><span class="Apple-style-span" style="font-family: sans-serif; font-size: 15px; border-collapse: collapse; line-height: 22px; ">And here is how to do it by subclassing vtkCommand:</span></div>
<div><font class="Apple-style-span" face="sans-serif" size="4"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 15px; line-height: 22px;"><a href="http://www.vtk.org/Wiki/VTK/Examples/Utilities/DataAnimationSubclass">http://www.vtk.org/Wiki/VTK/Examples/Utilities/DataAnimationSubclass</a></span></font></div>
<div><span class="Apple-style-span" style="font-family: sans-serif; font-size: 15px; border-collapse: collapse; line-height: 22px; "><br></span></div><div><span class="Apple-style-span" style="font-family: sans-serif; font-size: 15px; border-collapse: collapse; line-height: 22px; ">Thanks for getting these back on track, David G. This is why we need these examples :)</span></div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><div><div><font class="Apple-style-span" face="sans-serif" size="4"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 15px; line-height: 22px; "><div>
<font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="border-collapse: separate; line-height: normal; font-size: small;"><font class="Apple-style-span" face="sans-serif" size="4"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 15px; line-height: 22px;"><br>
</span></font></span></font></div><div><font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="border-collapse: separate; line-height: normal; font-size: small;"><font class="Apple-style-span" face="sans-serif" size="4"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 15px; line-height: 22px;">Jordi - hopefully you will have a pleasant surprise next time you check your email with all of this discussion :)</span></font></span></font></div>
<div><font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="border-collapse: separate; line-height: normal; font-size: small;"><font class="Apple-style-span" face="sans-serif" size="4"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 15px; line-height: 22px;"><br>
</span></font></span></font></div></span></font></div><div>David D.<br></div></div>