[vtkusers] coloring a sphere by elevation

David Doria daviddoria at gmail.com
Fri Aug 19 09:48:31 EDT 2011


On Fri, Aug 19, 2011 at 9:39 AM, Liam Kurmos <quantum.leaf at gmail.com> wrote:

> I'm creating an example to colour the surface of a sphere using a
> lookup table, where the scalar value is just the value of one of the
> vertex coords.
> The code below essentially works but only shows 2 colors.
>
> 2Qs:
>
> -why dont i see a range of colors from the lookup table?
>
> -i thought i should be able to get the coordinates of a vertex from
> the vtkPointData but i couldnt do this or find an example and had to
> use vtkPolyData->getPoint(i). Is it straight forward to get down to
> the points for pointdata?
>
>
> any thoughts appreciated,
>
>
> Liam
>

Did you see this example?

http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/Color_a_mesh_by_height

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110819/e94f7e6d/attachment.htm>


More information about the vtkusers mailing list