[vtkusers] normal vectors on streamlines

Yifei Li yifli82 at gmail.com
Mon Nov 14 17:15:11 EST 2011


Hi all,

I retrieved the normal vectors by

vtkFloatArray* normals =
static_cast<vtkFloatArray*>(streamer->GetOutput()->GetPointData()->GetArray("Normals"));
        float normal[3];
for (int i = 0; i < normals->GetNumberOfTuples(); i++)
  {
    normals->GetTupleValue(i, normal);
    vtkMath::Normalize(normal);
    cout << normal[0] << ", " << normal[1] << ", " << normal[2] << endl;
  }


However, I saw in the output from above many zero vectors (0, 0, 0), and
also (nan, nan, nan).

So it seems there exists bugs in vtkStreamTracer's normal computation
routine.  Is there anyone who had this problem?

Yifei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111114/00f66517/attachment.htm>


More information about the vtkusers mailing list