Hi Fearhope, <div>I found material that could be helpfull for you <a href="http://www.vtk.org/Wiki/VTK/Presentations">http://www.vtk.org/Wiki/VTK/Presentations</a> , the presentation Transformations. </div><div>I have one notice concerning attached image, frame actor for unit sphere (without any transformation) is cube centered at the origin [0,0,0]  with side length 2 with following bounding box (so it does not have nearest left corent at the origin )<p class="p1">
<b>  Bounds: </b></p>
<p class="p1"><b>    Xmin,Xmax: (1, -1)</b></p>
<p class="p1"><b>    Ymin,Ymax: (1, -1)</b></p>
<p class="p1"><b>    Zmin,Zmax: (1, -1)</b></p><div>Jana</div><br><div class="gmail_quote">On 4 June 2012 18:52, fearhope <span dir="ltr">&lt;<a href="mailto:fearhope@gmail.com" target="_blank">fearhope@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jochen and David !<br>
<br>
thanks for your kind reply.<br>
<br>
I have recently found that sphere uses actor&#39;s origin as a coordinates frame<br>
according to many experimentatons. i.e., it moves relatively to the actor&#39;s<br>
origin. actor-&gt;SetPotion() means to move actor&#39;s origin itself. so, they<br>
should not be changed at the same time. and because the sphere source is<br>
changed to polygon data (vertex and edges set), we cannot have original<br>
vtkSphereSource object from the actor reversely.<br>
Is this correct ?<br>
<br>
- actor&#39;s coordinates frame<br>
<a href="http://vtk.1045678.n5.nabble.com/file/n5713569/actor_frame.png" target="_blank">http://vtk.1045678.n5.nabble.com/file/n5713569/actor_frame.png</a><br>
<br>
if so.. there must be three options to update sphere&#39;s location.<br>
*1. regenerate new sphere source and mapper, and allocate the new mapper to<br>
the actor at time t-1.<br>
2. when make sphere initially, don&#39;t change initial center of sphere.<br>
instead move the actor using SetPosition(). then, when the sphere needs to<br>
move, use SetPosition function of the actor.<br>
==&gt; in this case, radius cannot be updated.<br>
3. when the sphere needs to move, transform the polygon data itself using<br>
vtkTransformPolyDataFilter.*<br>
<br>
Is this also correct ? (sorry for bothering you. I&#39;m trying to write as<br>
detail as possible for other people)<br>
<br>
I have tested 1,2 options. however the problem is speed. while option 1&#39;s<br>
speed is around 0.35 ms, option 2 took around 0.002 ms, almost 10 times<br>
faster. so, option 2 is better. however, when consider initial intent of vtk<br>
design, option 2 seems not to be a good approach.<br>
<br>
so, it seems that option 3 is best solution if it is fast enough (I guess it<br>
must be similar to the option 2).<br>
therefore, I would like to test option 3 now.<br>
<br>
*however, to transform polygon data directly, the parameter for<br>
SetInputConnection is required (I referred to the source code in the<br>
presentation file recommended by David).<br>
Now, how can I get the parameter from actor reversely like<br>
actor-&gt;GetMapper()-&gt;GetInput()-&gt;???*<br>
<br>
=======================<br>
vtkSmartPointer&lt;vtkTransform&gt; transformation=<br>
vtkSmartPointer&lt;vtkTransform&gt;::New();<br>
transformation &gt;Translate(double x, double y, double z);<br>
transformation -&gt;RotateX(double angle);<br>
transformation -&gt;Scale(double x, double y, double z);<br>
<br>
vtkSmartPointer&lt;vtkTransformPolyDataFilter&gt; transformFilter =<br>
vtkSmartPointer&lt;vtkTransformPolyDataFilter&gt;::New();<br>
transformFilter-&gt;SetInputConnection(sphereSource-&gt;GetOutputPort());<br>
transformFilter-&gt;SetTransform(transformation);<br>
transformFilter-&gt;Update();<br>
=======================<br>
<br>
I think this would be last question..<br>
<br>
thanks in advance..<br>
Kind regards,<br>
Yeonchool<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/what-s-the-difference-between-actor-s-position-and-sphere-s-center-tp5713553p5713569.html" target="_blank">http://vtk.1045678.n5.nabble.com/what-s-the-difference-between-actor-s-position-and-sphere-s-center-tp5713553p5713569.html</a><br>

<div class="HOEnZb"><div class="h5">Sent from the VTK - Users mailing list archive at Nabble.com.<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></div>