Let’s say that you have a mesh and a point. You want to colour the mesh according to how far the different parts of the mesh are from the point.
To do this, we need to:
- Import the mesh and the point into Grasshopper
- Calculate the distance between the different points on the mesh
- Apply these colours to the mesh
Colour a mesh with smooth gradients
Colour a mesh with one colour per face
Note that here I am using the ‘Mesh Explode’ component to break a mesh into its faces, which is part of the MeshEdit plugin for Grasshopper.
I also have grafted both inputs to ‘Mesh Colour’ – don’t forget to do this! You should quickly see why if you don’t…
If you don’t want to use MeshEdit, you can recreate the behaviour using the slightly more clunky method below:
Finally, if you are writing script, it is also possible to colour a mesh using the C# component. See this post for more information.