[vtkusers] Line rotation axis

Alex Malyushytskyy alexmalvtk at gmail.com
Mon Oct 15 18:37:14 EDT 2012


Assuming
P1 (x1,y1,z1)  - point which belongs to line
P2 (x2,y2,z2)  - direction vector
following should work

Translate (-x1, -y1, -z1)
RotateWXYZ 	( alpha,  x2,y2,z2	)
Translate ( x1, y1, z1)

Alex

On Mon, Oct 15, 2012 at 1:34 PM, Federico Milano <fmilano at gmail.com> wrote:
> Hi. I would need to rotate a polydata around a line that does not go through
> the origin. Given the line equation as a point that belongs to the line and
> a direction vector, what's the best way to express this rotation using
> vtkTranforms?
>
> Thanks,
>
> Federico
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list