Coloring Easter eggs is a tradition in my family, but this year I am spending Easter in Germany and have some spare time to waste, so I thought I would upgrade the egg coloring process to the digital age. In Grasshopper you can use the Gradient component to add color gradients to meshes. You can either apply color values to the vertices or faces depending on if you want a smooth gradient or not. So simply plugin an egg mesh into the gradient component and see the egg colors come to life! Tadah! April fools!
Oh, if it were only so easy. It’s actually not straight forward at all. Colors are best applied to meshes by scripting where you assign colors to the mesh vertices or faces, depending on if you want a smooth gradient or not. This requires you to know a little bit about your mesh topology, which you usually would not want to care about at all. Don’t worry though, I came up with a neat solution.
I wrote a small component for Grasshopper which can be used for all kinds of coloring needs (not only eggs, yay!). The only thing required is a mesh geometry, a list of points, and some number list of values which will be used for the color assignment.
In the picture above I wanted to colour the surface from one side to the other. First I meshed the surface and added some points on the surface and extracted the x-coordinate for each point. With the gradient tool it’s possible to generate a list of colors based on the value list. I plugged those colors into the into the component I wrote . This component takes a mesh, the set of points and the list of colors, and then it colors the mesh. It outputs either a smooth gradient, or a uniform color on each mesh face. Whatever is preferred! The mesh can then be directly baked into Rhino. (Rhino 6 also features very nice rendered previews from Grasshopper so you don’t even need to bake anymore to make pretty pictures~)
I made a version available on Food4Rhino. Once installed it will appear under QueenBee – Geometry.
Get it here:
For anyone who may be interested on how how to do it on their own here is a nice guide to get started: