Tutorial 3: Working with Strain

In this tutorial, you will work through the design of a base that could be used for a human figure. In the process, you will learn how to change the lengths of flaps in several ways (and why you might want to do so) during the course of the design.

Select File->New to create a new square. We will be making a human figure, so using the techniques described in the previous tutorial, draw a stick figure of a human as shown in Figure Tu-3-1.


Figure Tu-3-1. Create a new, 5-limbed stick figure.

Initially, all of the edges of the tree graph have the same length, which is defined to be 1 unit. In Design View, the length of the edge appears near the middle of the edge. For many designs, it is desirable to change the lengths of some of the edges to make their corresponding flaps longer or shorter than other flaps. For example, if you were making a grasshopper, you'd want the back legs to be much longer than the front legs. In TreeMaker, you can choose the length of any flap relative to the others by setting the length of the corresponding edge.

In the previous tutorial, you saw that we can change the length of an edge by selecting the edge and changing the length in the Inspector. Do this now for the "head" (edge 1). Select it; the Inspector will switch to the Edge panel.


Figure Tu-3-2.

We'll change the length of the "head" flap by giving it a new length. Enter "0.6" in the "length" field, which will make the head flap a bit over half the length of the arms and legs. If you like, you can also enter a label such as "head" in the "label" field as well. Then hit Enter or click the "Apply" button. You will see the edge length change to its new value in the Design window.


Figure Tu-3-3.

You can see that the length of the edge (the number near the middle of the edge) is now 0.6. The label, if you entered one, also appears below the index of the edge.

It's probably worth a reminder that the on-screen length of the blue line segment that represents the edge hasn't changed a whit; what matters is the numerical length value that appears next to it. However, note that the node circle (whose radius is given by the scaled length of the incident edge) has become smaller.

Now we'll also shrink the torso a bit. Click on the torso and enter a length of 0.8 in the length field. Then hit Enter. The result is shown in Figure Tu-3-4.


Figure Tu-3-4.

There's another way to change the length of a flap, which is through the Edit menu. The Edit->Edges submenu lets you alter properties of one or more edges at a time. Thus, to change the lengths of both legs in our model, you select edges 5 and 6, then choose Edit->Edges->Set Lengths.... This will bring up a dialog box.


Figure Tu-3-5.

Enter "1.2" in the text field and click OK. You'll see that now both edges have a length of 1.2, as shown in Figure Tu-3-6.


Figure Tu-3-6.

Instead of specifying the lengths of a group of edges, you can also scale a group of edges by a common factor, by selecting the edges and then choosing Edit->Edges->Scale Lengths....

We'll now make this model symmetric. Turn on book symmetry as you did in the previous tutorial. In the Tree Inspector panel, click the "Book" button; then create symmetry conditions on the leaf nodes, forcing node 1 to lie on the line of symmetry and pairing nodes 3 and 4 and nodes 6 and 7 about the line of symmetry.


Figure Tu-3-7.

Now we'll optimize to find a base. Select Action->Scale Everything. When the run is complete, you should have something that looks like Figure Tu-3-8.


Figure Tu-3-8.

The scale of this is 0.3150 and you can generate the crease pattern if you like by selecting Action->Build Crease Pattern. However, it's often possible to find a different crease pattern with possibly a larger scale (which gives a larger base) for exactly the same tree and conditions. Sometimes you can find these other patterns simply by starting from a different initial configuration of nodes.

In particular, whenever you have a large, many-sided polygon as we do here, it's often possible to get a larger crease pattern if you drag one of the nodes inside the polygon. In this case, node 1 is the obvious candidate. If you try to click and drag directly, node 1 won't move because it's pinned, but you can drag a pinned node by holding down the appropriate modified key while clicking: Option on Mac, Alt on Windows, Alt or Control on Linux. So, holding down the modifier key, click on node 1 and drag it down into the middle of the crease pattern, as shown in Figure Tu-3-9. In addition, drag nodes 3 and 4 to the upper right and left corners, respectively.


Figure Tu-3-9.

Your figure should look something like this but it probably won't look exactly the same. You should see some red lines, however. The red lines are paths that are not valid, meaning that their actual length is less than their minimum length. They are a sign that no valid crease pattern is possible with this arrangement of nodes.

Again, select Action->Scale Everything to find a new configuration. The result should look like Figure Tu-3-10.


Figure Tu-3-10.

The new scale is 0.3349 (or thereabouts), which is somewhat larger than the previous value. This configuration is more efficient than the last. At this point, you might wish to see what the crease pattern would look like by selection Action->Build Crease Pattern, so go ahead a try it.

You will find that TreeMaker can't build the pattern just yet; it gives you the following warning:


Figure Tu-3-11.

What's wrong?

TreeMaker cannot build polygons or creases if there are unpinned, or movable, leaf nodes that are inside what would be a polygon. What do we mean by pinned? A pinned node is one that cannot be moved in any direction without either violating a path constraint or going outside the paper.

Nodes aren't the only things that are pinned. An edge whose length cannot be made larger without causing some path to be violated is also said to be pinned. Initially, all edges are unpinned. When you maximize the scale, most of the edges will end up pinned, but not necessarily all. In Figure Tu-3-10, all edges except edge number 1, and all leaf nodes except node 1, are pinned.

An edge that isn't pinned can be made longer without reducing the lengths of other edges, which means that the flap in the base that corresponds to the edge can be made longer. Sometimes lengthening a flap of the base is aesthetically acceptable; sometimes it isn't. For this example, if we lengthen the head flap, we'll just have a bit more paper with which to make hair, facial features, et cetera. So we can, and will, lengthen edge number 1.

But how long should we make edge 1? TreeMaker will find that out for you. Click once on edge 1 and shift-click on node 1 to select them both. Then go to the Action menu and select the command Action->Scale Selection, which is a second form of optimization. This command will move any unpinned selected nodes in order to maximize the length of the selected edge or edges. (If you have selected more than one edge, they will all be lengthened proportionally.) When the optimization ends, you should have something like Figure Tu-3-12.


Figure Tu-3-12.

In this optimization, TreeMaker moved node 1 around while lengthening edge 1 (while respecting the symmetry condition we placed on node 1) until edge 1 reached its maximum value, at which point the 4 paths from node 1 to nodes 3, 4, 6, and 7 all became active. Those newly-active paths are shown in green. Since node 1 is surrounded by active paths, it is now pinned, and since edge 1 is now contained in an active path, it, too, is now pinned.

Now, look closely at the length of edge 1: its length appears as "0.600+5%". This edge is said to be strained. Strain is a deviation of an edge from its original desired value. This edge has been strained by 5%, which means it behaves as if it were an edge of length 0.6275, rather than its original length of 0.6.

Strain is an important concept, particularly when we start imposing symmetry conditions on a base. A strained edge behaves as if it were actually longer or shorter than its original value. However, an edge "remembers" its original ("unstrained") length, a behavior that we utilize elsewhere.

There is a set of strain-related commands in the Edit menu. Edit->Strain->Remove Selection/All sets all strain to zero; it undoes any strain changes. Edit->Strain->Relieve Selection/All does something quite different: it absorbs length changes due to strain into the edge itself and resets the strain to zero. Select Edit->Strain->Relieve All now. You'll see that the length of edge 1 has now changed from 0.6 to 0.6275.


Figure Tu-3-13.

Now, all edges are pinned and we can proceed with the construction of the crease pattern. Select Action->Build Crease Pattern to construct the crease pattern and select View->Creases View to show just the creases, as shown in Figure Tu-3-14.


Figure Tu-3-14.

There is one more type of optimization that involves strain that can be useful. The base above is not as elegant as it could be, because nodes 6 and 7 are close to a corner but are not precisely in the corner. We'll now modify the base so that four of the flaps come from the corners of the paper.

We can force nodes 6 and 7 to land on the corner by creating another condition. First, select Action->Kill Crease Pattern and View->Design View to get rid of the creases and go back to the Design view. Then select node 7 and choose Condition->Node(s) Fixed to Corner. The result is shown in Figure Tu-3-15.


Figure Tu-3-15.

Choose Action->Scale Everything. The result is shown in Figure Tu-3-16.


Figure Tu-3-16.

Nodes 6 and 7 are now on corners, but nodes 3 and 4 got dragged away from the corners. So apply that same condition to node 4 (node 3's position is implied by the mirror symmetry condition) and try optimizing again.


Figure Tu-3-17.

Now, all four nodes are on the corners, but we've lost the four active paths that forced node 1 to be pinned. There is still another type of condition that can remedy this; we can force a path to be active. A path is identified by the nodes at each end, so select nodes 1 and 4, then choose Edit->Select->Path from Nodes. This selects the path (which is path 3), and makes it visible (selected parts are always visible, independent of other settings). As shown in Figure Tu-3-18, the path is shown in amber, which means that it is feasible, but not active.


Figure Tu-3-18.

Now choose Condition->Path Active; you will see a condition appear that is attached to the path. We will put a similar condition between nodes 1 and 7. But we'll do it a bit more efficiently. Select nodes 1 and 7, then choose Condition->Path Active. TreeMaker will apply the desired condition to the path that runs between the two selected nodes, as shown in Figure Tu-3-19.


Figure Tu-3-19.

As with the "node on corner" conditions, we only need to create conditions on half of the model if we've made it symmetry. It's a good idea to keep all such conditions on the same side of the symmetry line to avoid inadvertantly duplicating (or missing) one.

Now, we should be ready for optimization. Choose Action->Scale Everything. TreeMaker puts up a warning, shown in Figure Tu-3-20.


Figure Tu-3-20.

Once you start creating conditions, it is to possible create more conditions than there are degrees of freedom in the problem. TreeMaker will warn you when you are getting close. Click "yes" to proceed.

TreeMaker will work a bit, and then will put up another warning.


Figure Tu-3-21.

Click "Yes" to revert to the configuration before optimization. This warning says that TreeMaker was unable to find a solution, which suggests that this problem is, indeed, overconstrained. In other words, it is not possible to make the four paths active and have the four nodes in the four corners. At least, it's not possible for this set of edge lengths.

However, it might be possible for a different set of edge lengths. The question is, what should they be, and how can we keep the tree close to what we've started with? The solution lies in the third type of optimization: strain optimization. In strain optimization, we allow some or all of the edges to be strained, but instead of trying to maximize the strain of a subset of the edges, in strain optimization, we try to minimize the total strain.

Since we will be allowing all of the edges to be strained, we need to set up additional conditions that enforce mirror symmetry. We have already set mirror symmetry on the positions of the nodes. We will now set mirror symmetry on the strain in the edges. That is, if two edges are mirror-symmetric, we would like them to have the same strain so that we don't end up with one longer than the other. Select edges 2 and 3, then choose Condition->2 Edges Same Strain. Do the same for edges 5 and 6. The result is shown in Figure Tu-3-22.


Figure Tu-3-22.

Now we are ready to optimize. Select all nodes and edges, by choosing Edit->Select->All. Then choose Action->Minimize Strain. TreeMaker will vary the positions of all nodes and the lengths of all edges to find a feasible configuration that satisfies all of the conditions we have created, while minimizing the RMS value of the strain, summed over all edges. Finally, TreeMaker can find the solution, which is shown in Figure Tu-3-23.


Figure Tu-3-23.

Now, you can see that all the edges are strained slightly, but all by relatively small amounts. All nodes and edges are pinned, so you can now build the crease pattern, by choosing Action->Build Crease Pattern.


Figure Tu-3-24.

Strain optimization is a powerful tool; it lets you create cleaner, more symmetric crease patterns and bases, while keeping the flap lengths close to what you originally desired.

You now know how to set up a crease pattern for a base with an arbitrary number of flaps and how to change the lengths of the flaps. You've also seen in this tutorial how to vary the lengths of flaps by maximizing and/or optimizing the strain in the tree edges. This gives you 90% of what you need to know to compute crease patterns with TreeMaker, and I encourage you at this point to go off and experiment. To keep things simple (and to keep the optimization times down), I have kept to small examples with a small number of flaps. But you can try much more complicated bases with much more complicated assemblies of flaps with TreeMaker; you are limited only by the computer's memory and speed (and of course, your own patience!). The next section will address some of the subtler issues of origami design using TreeMaker. You can continue working through it, or go off, experiment, and then come back when you're ready.

Previous: Tutorial 2: Imposing Symmetry     Next: Tips 1: Adding Nodes