Hi,<br><br>I want to use color mapping to represent the temperature on a 3D surface. The surface mesh contains 900 vertices stored in an obj file. The temperature is related to the vertex ID like the following format in a txt file.<br>.....<br>50 87.4<br>51 85.2<br>52 74.9<br>53 78.3<br>54 80.6<br>.....<br><br>My code for drawing the surface (textured) is below, <br>//*******************************************************<br> vtkOBJReader *reader = vtkOBJReader::New();<br> reader->SetFileName("surf.obj");<br><br> vtkPolyDataNormals *normals = vtkPolyDataNormals::New();<br> normals->SetInput(reader->GetOutput());<br><br> vtkPolyDataMapper *mapper = vtkPolyDataMapper::New();<br> mapper->SetInput(normals->GetOutput());<br><br> vtkBMPReader *texReader = vtkBMPReader::New();<br>
texReader->SetFileName("textu.bmp");<br><br> vtkTexture *texture = vtkTexture::New();<br> texture->SetInput(texReader->GetOutput());<br><br> vtkActor *actor = vtkActor::New();<br> actor->SetTexture(texture);<br> actor->SetMapper(mapper);<br><br> vtkRenderer *renderer = vtkRenderer::New();<br> renderer->AddActor(actor);<br><br> vtkRenderWindow *renwindow = vtkRenderWindow::New();<br> renwindow->AddRenderer(renderer);<br> renwindow->SetSize(500, 500);<br>//**************************************************<br><br>I do not know how to convert the temperature data to color map on this surface. I have read rainbow.tcl but still do not understand it. Does anyone can point out the procedure or show me any similar example? Thanks a lot!<br><br>Toron<br><p> 
<hr size=1>Be a better sports nut! Let your teams follow you
with Yahoo Mobile. <a href="http://us.rd.yahoo.com/evt=51731/*http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ
">Try it now.</a>