Cycles procedural stripe texture along slope I have a sculpted mesh that looks something like this:

(the colors are indicating the height)

And I'm trying to make a striped texture (black and white), where the stripes should be aligned with the slope of the mesh. Like this:


I would like to do this procedurally because the actual mesh is full of these slopes, but I'm not managing to get anywhere near the desired texture. 

Is it possible to do this using only the cycles material?
The result don't need to be perfect along the top, because there is another shader acting on the ridges. The accuracy on the slopes and on the valleys is more important.

Thanks!

ps: the texture will be used as a factor for mixing shaders.

EDIT:

I think I'm getting closer. I managed do make the stripes perpendicular to the slopes (I needed them to be parallel ). At least now looks like it's possible to achieve the desired distortion.
I did now a little bit of work on that problem. I didn't get it perfect but it's pretty good I think so I wanted to share it. My attempt was to take the Normal of the currently rendering Pixel and calculate the slope 90° downwards from the normal (that's a tangent to the surface). My results with that are ok but not perfect because at the 3 edges of your model it will fail almost completly. I tried my best to counteract that with the Pointyness value and different direction of the tangent and so on but nothing did quite work exactly like I wanted it. Here are the results:





You can see how perfect it works an that planes. The stripes are always downwards, no matter how its rotated.