Grasshopper

algorithmic modeling for Rhino

coloring a mesh according to its distance from a surface.

This is my first attempt at a grasshopper program, so please bear with me.

I have a mesh and a surface.  I would like to color code the facets of the mesh according to the distance from the surface.  The desired application is more complicated, the hemi-sphere and plane are for illustration.

I take the four corners of each mesh face and find the distances of closest point to the surface. These are averaged to get the distance from the center of the mesh face.

Normalized and connected to a gradient and fed back into a new mesh object.  Although I get color change in the mesh, it does not have the pattern I would expect.

Any tips on where I have gone wrong?

Attached are the files.

Thanks,   Shaw

Views: 2043

Attachments:

Replies to This Discussion

Hi Shaw,

mesh colors are per-vertex (not per-face), so you just need to feed the list of vertices and calculates their distance to the mesh. Please see if this definition helps,

- Giulio
___________________
giulio@mcneel.com
McNeel Europe, Barcelona
Attachments:
Giulio,

I have a lot to learn about Grasshopper and about simplicity! Wonderful result. Thank you.

Shaw

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service