[vtkusers] How can i point a 3D point by cylinder source

Alex Malyushytskyy alexmalvtk at gmail.com
Mon May 13 17:46:26 EDT 2013


>From VTK documerntation:
"vtkCylinderSource creates a polygonal cylinder centered at Center; The
axis of the cylinder is aligned along the global y-axis."

So to achieve what you want translate output of vtkCylinderSource (which is
polidata) height/2 along y-axis which will place beginning of the cylinder
at origin, then rotate it about x (90 degrees ) to have axis of the
cylinder aligned with  Z axis.

You may look at

vtkTransformPolyDataFilter and  vtkTransform

There some examples on wiki pages:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/OrientedArrow

Alex


On Sun, May 12, 2013 at 10:42 PM, Arindam <arindam at triassicsolutions.com>wrote:

>  Hi,
>
> I am showing my 3D point with 3d glyphing with spare source. And i want to
> point the points by cylinder source.But by each translation the point is
> showing at the middle of cylinder source.But i want it to come at the tip
> and it should point vertically .Please help me for doing this.
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130513/50fa6d44/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 68516 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130513/50fa6d44/attachment.png>


More information about the vtkusers mailing list