I am continuing with the second example of the M.3 Formulated bodies chapter. The Generative Design book describes this example as follows: ‘The next step to creating a three-dimensional form is easy. The values of x and y are used to find a value for the z-position–the grid point is now transferred into the third dimension. This kind of transformation is an ‘elevation contour’ since the x- and y-coordinates of the grid points are not altered.’ You can find the original code here:
When I started I was a little confused by the fact that a formula was discussed in the Generative Design book while I could not find that formula in the code. The formula should be on line 87 of the program but that line says: float z = sin(x); So I thought that it would be worth a try to use the formula from the book in the program in a later stage. But then I saw that this formula was used in the next program (M_3_2_02). For changing the code I will go through the same routine as I used in M_3_1_01. I put the origin point in the middle of the display window. Copy and paste the mesh four times. Ok… I have a large curtain now. Used the same light settings as I used in M_3_1_01. And writing everything away as a .pdf Which gives me a java.lang.ArrayindexOutOfBoundsException. So I write it to .png
I have introduced a global value called ModifyDistance. Which multiplies the value of a variable. This is not something new but it gives you the possibility to modify certain parts of the grid curtain. And what’s even more notable is that it gives you the possibility to make interesting compositions with it. I also found a way to break the curtain. Which might come in handy.
I’ve broken up another part of the curtain. This might be a good theme to continue.
So now it’s not alone about bending the grid but also about breaking the mesh.
Made all the loops the same. Which is of course a bit silly. But although this change is very simple it still gives me interesting images. Switched off all the strokes. Which gives even nicer images. The object has now changed from a curtain to a kind of windshield.
Used x + 2 for the z value. Which makes the windshield a bit more complex than the earlier version.
Used x / 2 for the z value.
Made a filled rectangle which is located horizontal. At least that is what I thought at that moment. But what I saw at a later stage is that it is not 1 rectangle but there are 16 rectangles located each above each other.
Used rotation for this sketch. Used ModifyDistance for the amount of radians.
I did not change much here. I only replaced the rotate command for rotateY in the for loops. And that makes a big difference for the images. Finally there is not much left from the grid. But it sure is bended and broken apart.