[vtkusers] Help
David Doria
daviddoria at gmail.com
Thu Feb 24 07:52:57 EST 2011
>
> 1.where is (0,0,0) or where is the origin?
>
You can add a sphere source at (0,0,0) to see where it is:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Sphere
<http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Sphere>
> 2.Can you help me do some improvement?This example uses a picture drawed
> by the code itself.How to improve the code to load a file of .ply and then
> get coordinate value?
>
Here is an example of how to load a ply file:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadPLY
<http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadPLY>
> 3.This program only demonstrates the coordinate value when I click at
> somewhere.How to improve the code to get normal vector of every triangle
> which is made up by three points?
>
You can use:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataExtractNormals
<http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataExtractNormals>along
with
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataCellNormals
<http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataCellNormals>to
get the triangle normals.
Good luck,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110224/1dad5c40/attachment.htm>
More information about the vtkusers
mailing list