Generative Design Variations M.3.3 The mesh class

Here is the Generative Design book text: ‘The calculation and rendering of the grids for the rest of the additional examples in this chapter are encapsulated in a class. This means that all the parameters for the mesh and the functions for calculating and drawing it are summarized in a separate part of the program, making it easier to generate the mesh; the code is also clearer. In addition, many standard forms are predefined in the class. The following two lines, for example, suffice to generate and draw a mesh. Here is an example of the ‘Steinbach screw,’ a form that features 100 tiles in the u and v directions, a value range for u from -3 to 3, and a value range for v from -Pi to PI:

Mesh myMesh = new Mesh(Mesh.STEINBACHSCREW, 100, 100, -3, 3, -PI, PI);

The mesh class is also contained in the Generative Design library documented in detail at A short reference for the mesh class is located at the end of this chapter.’ Until here the Generative Design book. You can find the original code here:

I have prepared a Flickr Album which contains all the images I have made during this assignment. You can find that clicking this link:

And because these programs do not work in JavaScript I have put all code involved on my loftmatic page. When you click on the previews you get to see the Processing code only.

There are a few things which I had to make clear to myself. I have the impression that this example was made to get used and use the mesh class. Not everything in the mesh class is clear to me. So to make good use of it I tried to merge some of the functionality of the earlier examples. One is the screendump function. I don’t know why the choice is made for saveFrame in the original program. Using saveFrame means that every time you run the program a screendump is made. But maybe I am missing something. And I would like to rotate and zoom the object. Maybe I can find a solution for that. Ok… So it is not possible to get the key-functionality from the earlier examples into this program without modifying it a bit. I think it is because the draw-block is encapsulated into the mesh class. And I do not want to make any changes in the class. But does my lights setup of the previous examples work. No because the program has another light functionality. Its added in setup. And I am supposed to work alone in setup? So I could change the light settings in setup? Lets try that. What is lightSpecular? Sets the specular color for light. It is set to 230, 230, 230 that is a light grey in RGB. But the mesh class uses HSB. So I have imported the light settings of my earlier examples in the setup block. It seems not to be necessary to uncomment the HSB line in the mesh class. Another thing is that I found that the 5th parameter in myMesh.setColorRange gives a nice pattern when you make it lower than 90.

There are 22 predefined meshes in the mesh class. They are called: plane, tube, sphere, torus, paraboloid, steinbachscrew, sine, figure8torus, elliptictorus, corkscrew, bohemiandome, bow, maedersowl, astroidallipsoid, triaxialtritorus, limpettorus, horn, shell, kidney, lemniscape, trianguloid and the superformula. I started to experiment with the steinbachscrew. Just because it was already incorporated in the code. I took the time for  playing with the parameters in the steinbach screw. After working with it for a while it seems possible to break the mesh down to very simple shapes. Which gave me some unexpected images. I also made a draw block in the first tab. This solved a few things for me. I can get my zoomFactor back using my up and down keys. And I can use the s-key for saving a frame. And it seems that it is giving me a better image quality.

Ok. I have noticed that all other examples of this program are the same. Except for the fact that they load a new predefined mesh shape from the mesh-class. My idea is to explore all the predefined meshes. I will generally describe what I have done. So I will not describe every change per mesh. After working with the steinbachscrew I continued with the plane mesh. But after a while it did not look very interesting to me. It’s a plane mesh. So I played with a few parameters but than I replaced the object for a tube mesh. Rotated it on the x-angle because it seems that it doesn’t make any difference to rotate it on the y-angle. So I replace that by rotation on the z-angle. You can make a very narrow band (or ribbon) with it. You can make it larger or smaller. Or you could introduce more tubes.

Used the sphere mesh. Decreased the value range for v from -1 to 1. Which gives me a very thin ellipse. Increased the value range for v from -100 to 1. This gives me a kind of bowl. And it seems that there is a gap in the bottom. Ok… if you increase -100 to -180. The bowl is complete. The hole has gone. There are a lot of possibilities already available when you work with this sphere.

A torus (to say it rough) is a donut shaped object. I removed the top half of it. And I made a version in which I removed the top sides. Wich gives me another kind of bowl. looked from various angles to the mesh and finally I have cut away the bottom and a part of the sides.

Warszawa Ochota railway station and the Calgary Saddledome are an example of a hyperbolic paraboloid. We are working with an elliptic paraboloid. Which is shaped like an oval cup. Why I have two of them on top of each other is a mystery to me. Tried to look at it from different angles. And a few views from the top into the paraboloid. Rotated the paraboloid almost 360º and stripped the sides. Reduced the value range for v from -30 to 30.

I skipped the steinbach screw because I started with that. I will continue with the sine mesh. I increased the value range for u from -5000 to 5000. Decreased the value range for u from -50 to 50. Which renders a very odd object. A very strange object. It is difficult to judge how this object would look like when it was would be printed in 3d (or 3d-printed).

What is a figure8torus? Checked that and a figure 8 torus is also known as a figure eight torus. The figure eight torus is an immersion of the torus which has a single (circular) double curve down the middle. Hope that makes sense. Started with the plane object. No changed angles whatsoever. Rotated the object on the x-angle -1.5. No rotation on the x-angle. -1.0 on the y-angle. Rotated the object -1.5 on the x-angle, -2.5 on the y-angle and 0.5 on the z-angle. Changed the radians to -90 and 90. Rotated the object on the x-angle by -0.5.

An elliptictorus is a surface of revolution which is a generalization of the ring torus. In other words the object has an inside pointy cavity in an elliptic shape on the outside. I have rotated it -0.4 on the x-angle. Cut off the top and bottom of the elliptictorus. Looking from the top inside the object. Is it a coincidence that this object is rotated 3.14 (pi) degrees on the x-axis? Filled the bottom again which shows the point element better. One image shows the bottom (or the inside) of the object. And another image shows the top of the object. Which looks like an apple.

The corkscrew mesh gives me a corkscrew-ish image. It looks like there are two corkscrews involved which are tangled into each other. When you decrease the radians from -10 to 10 you can get very nice shaped ribbon-like objects. Making the ribbon thicker gives you other objects. Lowered the amount of tiles to -600. And decreased the radian value rage to -180 and 1 makes the ribbon thicker.

Next one is the bohemiandome. It’s quite simple: If you rotate a circle which is parallel to a plane in a circle that is perpendicular (a straight line at an angle of 90°) to the same plane, the resulting envelope is a bohemian dome. Well… it is not really clear to me yet. So we have this tube. I have cut a part of it. But it still doesn’t make a lot of sense. Ok. And than it folds inside on the lower part. And it folds over the upper part. Ah… got it. And those inner and upper foldings connect to each other in the final bohemian dome object.

The bow mesh. I think with bow they mean arc? A continuous part of the circumference of a circle (circular arc) of an other curve. Hmmm… think I am wrong here. This object doens’t look like a bow. It is a bow-ish object though (from the side (a little)). I’am now almost sure that rotating 3.14 on the x, y or z angle is a full circle round the object. Rotating 1.57 is half the circle. Cut away the lower part. The ends connect fine at 90º. Cut away the side parts.

The meadersowl mesh seems to be a flat object. Or it exists out of flat planes if you look at the object under a zero angle. But rotated on the y axis it seems it exists out of ellipses wich are sticked to each other but not in a random way. Decreased the v-value range radians to 0. Which seems not a good idea. So I increased it to 90. Made some examples with the same viewpoint. But I increased the v-value-range to -360. And decreased the v-value-range radians from -360 to -180.

I checked what an astroidal ellipsoid is. Again its very simple: The surface which is the inverse of the ellipsoid in the sense that it ‘goes in’ where the ellipsoid ‘goes out.’ Sounds logical. But what to imagen with that? Rotated the object on the x-axes for 1.0 degrees. Rotated the object on the y-axis for 0.785 degrees? This is a very strange object. It behaves totally unexpected on my input. I rotated it 3.57 degrees on the x and -0.785 degrees on the y axis.

I could not find any theoretical explanation about what a triaxialtritorus is. And it looked pretty complicated when it showed up for the first time in my display window. Rotated it on the y-axis for 1.57 degrees but that shows me just the opposite of the object which is still very complex. Rotated it 0.785 on the x-axis but the object stays a mystery to me. It is still not completely clear to me. I rotated the object now 0.5 on the x-axis and -0.2 on the y-axis. A kind of ashtray object. Is there anyone out there who knows what an ashtray is? I rotated the object on the y-axis – 0.785 degrees.

The limpet torus. I did not find any description. And when opening the object it doesn’t have a specific shape. Looks like an ellipse with a hole in the middle. I rotated the object 2.0 degrees on the x-axis. And now it looks very UFO-ish (seen from the bottom-side). Rotated it 3.14 degrees. I have cut away the bottom? And I have cut away some piece of the front.

The horn. But it looks like there are two horns involved. I have cut away the inside of the horns. And I have broken down both horns by decreasing the u value range to -1, 1. Ah… I have noticed that you also can use floats. It doesn’t have to be integers. That gives me some more freedom. Could make a not so perfect ‘c’. And a not so perfect ‘6’.

The shell mesh. It is possible to make the inner and outer swirl longer. But that is not endless because when you continue to make the outer swirl longer you end up with lesser and lesser points. It’s u and v direction value range is now -32 but if you double that amount the tiles are going to show up. I have cut away the top of the shell. Rotated the shell mesh -0.2 degrees on the x-axis. The value range for v is changed to -40, 30. I have increased the u-value range to -64.0, 6.3. And because the tiles showed up I had to increase the tiles to 1000 x 1000.

The kidney mesh looks like two squashed balls on top of each. Rotating it on the z-axis seems to make no difference. Except when yo cut a part of the object away. Decreased the value range for v from -50 to 180. Rotated the object 1.57 degrees on the y-axis.

The lemniscape mesh looks like a flattened four-leaf clover. The anti-aliasing doesn’t work well here. Specially in the middle it doesn’t do a good job. I’ve rotated the object 1.0 degrees on the x-axis. Which gives me a total different object. Rotated it again on the z-axis for 1.0 degrees. Yet another different object. Rotated it -2.0 on the x-axis and 2.0 on the z-axis. Again a totally different object. I don’t see how this object is related to the four-leaf clover. Tried to find an angle in which you can see the original four leaf clover but also the other shape it can have. It stays a mystery for me how this object behaves.

The trianguloid mesh is a kind of knot (I think). Hmmm… when you rotate it on the y-axis it is a very complicated knot. And when you cut away a lot you can see that the basic shape looks a bit like the Toyota logo. If you cut away a little less you can see how it all is related to the final object. I have added a bit more material. Don’t know if this makes sense for the recognition of the object.

And the last mesh is the superformula. It can be used to describe many complex shapes and curves that are found in nature. But I only see a not so perfect sphere. Eh… So I have cut away one-sixt part and I get a 3-dimensional-pacman-like object with a pointy head? When you look into the mouth of the pacman you see the inside of a sphere. Which seems straightforward to me. I have put the object on its side and made an opening in it. But there seems to be a copy of itself inside the object.


Comments? Leave a reply.

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s