<div><div class="gmail_quote">On Wed, Sep 15, 2010 at 1:23 PM, Haider Syed <span dir="ltr">&lt;<a href="mailto:hsyed88@gmail.com">hsyed88@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;">
I have set up a very basic vtkParametricTorus and can&#39;t figure out how to move the &quot;center&quot; of the torus to an x,y,z location of my choice.<br><br>vtkParametricTorus *torus=vtkParametricTorus::New();<br>    torus-&gt;SetRingRadius(tumor_rad);<br>

    torus-&gt;SetCrossSectionRadius(0.00028);<br><br>    vtkParametricFunctionSource *ptorus=vtkParametricFunctionSource::New();<br>    ptorus-&gt;SetParametricFunction(torus);<br><br>    vtkPolyDataMapper *torusMapper=vtkPolyDataMapper::New();<br>

    torusMapper-&gt;SetInput(ptorus-&gt;GetOutput());<br><br>    vtkActor *torusActor=vtkActor::New();<br>    torusActor-&gt;SetMapper(torusMapper);<br><br>Please help.<br><br>Thanks,<br><font color="#888888">Haider<br><br>
</font></blockquote>You can create a vtkTransform and apply it with vtkTransformFilter. Here is an example of the setup:<div><br></div><div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/TransformFilter">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/TransformFilter</a><br clear="all">
<br></div><div>Thanks,<br><br></div><div>David </div></div><br></div>