hello <br><br>I have the next file:<br><br># vtk DataFile Version 3.0<br>vtk output<br>ASCII<br>DATASET POLYDATA<br>POINTS 2 float<br>0 0 0<br>9 0 0<br>LINES 1 3<br>2 0 1<br>CELL_DATA 1<br>scalars cellvar float<br>LOOKUP_TABLE default<br>
0.0 <br>POINT_DATA 2<br>scalars pointvar float<br>LOOKUP_TABLE default<br>-1.0 1.0<br><br>which draw a line with the next lookUptable:<br><br>vtkSmartPointer<vtkColorTransferFunction> lut = vtkSmartPointer<vtkColorTransferFunction>::New();<br>
lut->AddRGBPoint(-1,1,0,0); //red<br> lut->AddRGBPoint(0,0,1,0); //green<br> lut->AddRGBPoint(1,0,0,1);// blue<br><br>the program draws a line from point 0 with scalar -1.0(color red) to the point 1 with scalar 1.0(color blue), it's describes a gradient between this two colors, but how to get gradients take into account the color green? I mean if the color green is 0 , how can I get that? without add another point in the middle of the line with scalar 0?<br>
|------------------------------------------------------------------------------------|<br>red green blue<br>-1 0 1<br>
<br>regards<br><br>ruben<br>