Creating Gradient/Colour textures to surfaces help

Hi, I'm relatively inexperienced with Maya but I would like to be able to create a landscape texture with gradient colour to represent height or peaks. Similar to 'ThemeView' - http://searchuserinterfaces.com/book/images/themeview.png

But I want it to be dynamic in the way that when I alter or sculpt a surface, the gradient of colour representing height remains. I hope someone can help me, and if I'm asking about this in the wrong forums please guide me to one that is more appropriate for my query.

Thanks!

attached image example from : http://www.jucs.org/ujs/jucs/Journal/Volume%207/Issue\_7\_6/discovering\_knowledge\_through\_visual/images/fig1.gif

J.

Select the geometry
Open the Attribute Editor
Go to [Rendering] Lighting/Shading->Assign New Material->Surface Shader
Click on the texture icon next to outColor in the Attribute Editor
In the Create Render Node window that opens, select "as projection" and click on the ramp icon
in the Attribute Editor you should see the projection node. Click on Fit to BBox
Adjust the ramp colors.

perfect. thankyou very much Michiel!

J.