[vtkusers] adding direction information to lines

Shriram Iyer shriram.uc at gmail.com
Sat Oct 20 18:28:24 EDT 2007


Hi everyone,

I have a bunch of points that are connected by lines to indicate a path. But
its not possible to determine the
direction of the path from these lines.

Is there a way to draw lines that are opaque on one end, fade off and are
transparent at the other in VTK?
Or draw lines that are thicker on one end? Or have a color gradient?

Here's a snippet of my code. 'Pts' holds the set of points that are to be
connected by lines. Is there a way to
add transparency or color information for each cell (a line in this case)
separately?

for (int i =0; i < numPointsInPath-1; i++)
{
       cellArray->InsertNextCell(2);
       cellArray->InsertCellPoint(i);
       cellArray->InsertCellPoint(i+1);
}
polyData->SetPoints(Pts);
polyData->SetLines(cellArray);


Any help would be greatly appreciated.

Shriram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20071020/364c4ddb/attachment.htm>


More information about the vtkusers mailing list