Hemesh: Part 3

illustration_plate_Part3
Evolution of shape

///////////////////////////////////////////////////////////////////////
——— HEMESH Library by Frederik Vanhoutte ————-
///////////////////////////////////////////////////////////////////////
Frederik Vanhoutte’s website

Source Code :
Sketches Processing
Hemesh Library

///////////////////////////////////////////////////////////////////////

CONES, CYCLINDERS & FLOWERPOTS

At the time of writing, it appears that the Hemesh library has undergone numerous modifications and additions with a new major release called, HE_Mesh 2014 2.0.13. I’ve decided to push on with this final part using the original library release from which all examples were written. I have however made some amendments to earlier code and most notably added sketches for version 2 and above of Processing. These were minor, basically placing all interface objects in the same window as the graphics window. In earlier versions, I was working with Processing 1.5.1 along with an earlier version of ControlP5 which, at the time, enabled to create a new and separate window for GUI objects. To be quite honest, version control is becoming a headache and I’m of the opinion that if your tools work fine in one version, why update to others? That said, this is intended as a tutorial and hence aimed for people who most probably are working with the latest version of everything. I therefore present to you my apologies in advance if some of these sketches do not run for all. My decision to finish this little tutorial on Hemesh with an earlier version should not be too problematic anyway, I have tested to the best of my ability on various versions of Processing, ControlP5 & Hemesh.

This final part to Hemesh takes earlier sketches from part 1 & part 2 of this tutorial and develops on these, mainly by adding GUI objects. Each of these GUI objects can modify the form in real time and are hence a practical means for exploring new shapes. Some would call this a parametric design approach. As the title of this post suggests, many of the forms will start to look like flowerpots. This was quite intentional on my part as I was looking to print some of these to give to friends as well as colour the patio at home. I should also point out that I received a joyful email from Filippo Losi, an Italian designer working with 3d printing techniques. He has made a variety of lamp shades which, like flowerpots are an interesting design to explore with Hemesh.

Filippo_Losi_Lamps Various lamps created by Filippo Losi

The first two examples which can be found in the Cones & Cylinders folder on our GitHub, introduce two new geometric forms : the cone and the cylinder. We also apply two different modifiers : Bend and twist. Lets have a look at the first sketch in which we implement a bend modifier to a cone. A cone has a number of facets (sides), height, radius, a number of steps in height and eventually a taper. Geometrically, a cone is basically a cylinder with a vertex at its apex as opposed to a circle. So, playing with the setTaper() method will give some interesting variations on the final form.

Again, the implementation of our modifiers are kept tucked away in our handy little createModifiers() function. The bend modifier which is determined by an angle factor, a ground plane and a bend axis is applied here.The visual result resembles a twist defined along a line on the x-axis. The WB_Line class determines the origin and the destination coordinates of a line along an axis and along which the form is twisted with an angle. To get the shape to bend in another direction, you’ll need to change values in the function ; L = new WB_Line(1, 0, 0, -1, 0, 0); and play with the setAngleFactor to get the desired effect.

With the second example, we use a cylinder as the basic form and apply a twist modifier. Notice that the twist modifier only uses an angle and line axis. There is no ground plane. Bend therefore can create the same visual effect as twist yet has more possibilities for shaping a form. The last sketch in this series implements a simple GUI with ControlP5. Each slider controls a parameter for the cylinder; height, base and top radius, facets and number of steps. You can toggle on and off wireframe and random extrusion, each of which has further controls. The final slider, or rather the first one in the GUI changes the twist angle.

illustration_plate_cones_Part3
Variations with cones, cylinders and the bend and twist modifiers.

I’ve added an extra folder for miscellaneous sketches on the GitHub. There are a few extra ideas in there that could be taken further, depending on what you are looking to do with Hemesh. I was looking to add colour to the growing garden, so cones and cylinders were a good basic shape to start from and experiment with. However, Hemesh has a vast array of geometrical shapes to play with, not to mention an unimaginable set of classes and methods for doing goodness knows what. Your imagination is your only limit here, albeit the technicalities of the library are really for the expert.