[vtkusers] weird results from vtkPolyDataNormals
    Terence Lim 
    tlim at mda.ca
       
    Tue Oct  9 15:19:11 EDT 2001
    
    
  
Hi,
I am trying to get a normal at a point on the surface from a polygonal
triangular mesh (output from vtkDelaunay2D).  I have read previous archives
and the man pages on Normals and I am still a bit confused as to what the
computed co-ordinates represent.   I have read that it is the average of the
normals for each polygon at a shared point but my calculated results do not
match the results of the algorithm. Am I doing something wrong?
pdn= vtkPolyDataNormals::New();
pdn->ComputePointNormalsOn();
pdn->SetInput(Delaunay->GetOutput());     // where Delaunay is PolyData *
pdn->Update();
float *n = pdn->GetOutput()->GetPointData()->GetNormals()->GetNormal(ptId);
vtkTransform *transform = vtkTransform::New();
transform->TransformNormal(n,n);
cout<<*n<<endl;
cout<<*(n+1)<<endl;
cout<<*(n+2)<<endl;
Thanks in advance,
Terence
    
    
More information about the vtkusers
mailing list