<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Dec 1, 2013 at 3:47 AM, sepideh20 <span dir="ltr">&lt;<a href="mailto:sce2020sahaf@yahoo.com" target="_blank">sce2020sahaf@yahoo.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello all,<br>
<br>
Actually I have built an unstructured grid including several cells (each<br>
cell is a hexahedron). Now I want to assign different colors to each of<br>
these cells. I do not how I should do that.<br>
<br>
Please kindly help me with any idea or any sample code.<br>
<br>
Many many thanks in advance.<br></blockquote><div><br></div><div>You have to create a color array and set that array as the &quot;scalars&quot; of your cells. Here is an example:<br><br><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCellsWithRGB">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCellsWithRGB</a><br>

<div><br>David</div></div></div></div></div>