In addition to the suggestions already given, In order to get “percent” VS “degree” you just need to do a little math in between.
This example uses one custom component to explode the mesh. There are a few others around.
Also, depending on the types of surfaces/meshes you are working with, I have found this to help speed things up a bit. Explode the mesh, decompose and measure against another vector(as described in other examples), then average them together. This effectively gives you the face normal as oppose to every vertex. Then process those values. In the workflow I use, when you reconstruct the mesh with the colors, it assigns the same color(1 color) to each vertex of each individual face. Resulting in a “colored by face” mesh. But if you want, just blur it after to get a smoother looking gradient.
For example, in the attached file, there are 10000 vertices. If I explode it, and only operate on the average of those face vertex normals, I get the vertex at the center,( 1 face normal) of the face. This reduces the values that are being operated on down to 2500. Lastly…this is just how I do it, there are other ways as well.
I have found this approach to be the most useful, IF you want to be able to describe a series of slope “ranges”, (which are really domains), and have control over the color of the ranges. Also, by using the find domain component, you can reuse the index to cull the resulting mesh, (isolating your slope zones).
SlopeAnalysis_Basic_CH.gh (18.9 KB)