[vtkusers] Vertex normal

Rachel aracha2010 at gmail.com
Sun Jan 30 18:17:17 EST 2011


Hello
I want to compute the normal of each point. then compute the angle between
the normal and a given vector n(1,0,0). I used vtkPolyDataNormals  to
generate the normals:

        normals->SetInput( mesh ) ;
	normals->ComputePointNormalsOn() ;
	normals->Update() ;
	vtkPolyData* polydata=vtkPolyData::New();
	polydata = normals->GetOutput();
      double n[3]={1,0,0}

     for(int i=0;i<mesh->GetNumberOfPoints();i++){
		pts_normal->GetPoint(i,p);
		double a= computeAngle(p,n);		
		
	}

i display only normals that have small angle with the vector n
the result i got is not that  i expected and if the angle is very small no
normals are displayed 
Note the mesh is of  3D human body.
any suggestion ? 
many thanks


-- 
View this message in context: http://vtk.1045678.n5.nabble.com/Vertex-normal-tp3363838p3363838.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list