<div class="gmail_quote"><div>Hi Pappu,</div><div> Curvatures are a surface property, not a point property. So you will need to:</div><div>1) Generate a surface from your points,</div><div>2) Make sure the surface is triangulated (using <span style="background-color:rgb(255,255,255);line-height:1.2em;text-align:left">vtkTriangleFilter if necessary),</span></div>
<div><span style="background-color:rgb(255,255,255);line-height:1.2em;text-align:left">3) Apply vtkCurvatures.</span></div><div><br></div><div><span style="background-color:rgb(255,255,255);line-height:1.2em;text-align:left">Andrew</span></div>
<div><span style="background-color:rgb(255,255,255);line-height:1.2em;text-align:left"><br></span></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>---------- Forwarded message ----------<br>
From: Pappu Kumar <<a href="mailto:papuu_k@yahoo.com">papuu_k@yahoo.com</a>><br>To: "<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>" <<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>><br>
Cc: <br>Date: Thu, 5 Jul 2012 01:08:53 +0800 (SGT)<br>Subject: [vtkusers] Color by curvature in python<br><div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><div>I am trying to color a set of (x,y,z) coordinates by curvature. My code so far is as follows:</div>
<div><br></div>from pylab import randn<br><br>#generate data<br>data=randn(300).reshape(3,100)<br><br>#x,y,z coordinates<br>x=data[0:1]<br>y=data[1:2]<br>z=data[2:3]<br><br>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:<br>
<br><a href="http://www.cmake.org/Wiki/VTK/Examples/Python/CurvaturesDemo" target="_blank">http://www.cmake.org/Wiki/VTK/Examples/Python/CurvaturesDemo</a><br><br>Thank you very much for your kind help.<br></div></div><br>
<br></blockquote></div><div><br></div>-- <br>___________________________________________<br>Andrew J. P. Maclean<br><br>___________________________________________<br>