generative modeling for Rhino
Attached two files, one for assigning colours based on slope, the other for removing facets based on slope.
I also changed your slope calculation to work directly on the z-component of the facet normal vector. I operate on the Absolute of the z-component, so it no longer matters whether the surface is upside-down or not.
The ColourBySlope def has been very helpful. Is the output from the F(x) component in degrees (slope) or does the Z normal need to be converted into degrees?
it appears to be in degrees
I have a question related to the ColorBySlope command you attached here. Is it possible to take the gradient you generate and use that to limit where, say, a curve (or set of curves) would be projected onto a surface? For example, if you drew a series of curves parametrically on the world plane, and then wanted to project those curves onto the surface, but only on the parts where the slope is a certain angle/color (in this example, the color of the surface represents a certain angle normal to the ground plane).