[vtkusers] Color by curvature in python

Andrew Maclean andrew.amaclean at gmail.com
Thu Jul 5 18:54:35 EDT 2012


Hi Pappu,
   Curvatures are a surface property, not a point property. So you will
need to:
1) Generate a surface from your points,
2) Make sure the surface is triangulated (using vtkTriangleFilter if
necessary),
3) Apply vtkCurvatures.

Andrew


> ---------- Forwarded message ----------
> From: Pappu Kumar <papuu_k at yahoo.com>
> To: "vtkusers at vtk.org" <vtkusers at vtk.org>
> Cc:
> Date: Thu, 5 Jul 2012 01:08:53 +0800 (SGT)
> Subject: [vtkusers] Color by curvature in python
> I am trying to color a set of (x,y,z) coordinates by curvature. My code so
> far is as follows:
>
> from pylab import randn
>
> #generate data
> data=randn(300).reshape(3,100)
>
> #x,y,z coordinates
> x=data[0:1]
> y=data[1:2]
> z=data[2:3]
>
> Now I want to calculate the curvature at each point using vtk. However I
> could not understand how to do it even by reading this example:
>
> http://www.cmake.org/Wiki/VTK/Examples/Python/CurvaturesDemo
>
> Thank you very much for your kind help.
>
>
>
-- 
___________________________________________
Andrew J. P. Maclean

___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120706/294f896e/attachment.htm>


More information about the vtkusers mailing list