This website is made for modern browsers. You are seeing this, because your browser is missing a feature or two. Please install the latest update or switch to a modern browser. See you soon.

Four-point sail

#form-finding #Kangaroo

Kangaroo Physics by Daniel Piker is a physics engine for simulation and constraint solving. It can be used within Grasshopper to find a physical equilibrium and to interactively explore different configurations of an idea. Kangaroo 2 comes preinstalled with Rhino 6 and higher and is not compatible with Kangaroo 0.099. Just like form-findingin general, it can be used for experimental design and design optimization. Kangaroo itself based on dynamic relaxation and its components introduce different parameters to the simulation. You can read more about the implementation in this forum post.

Using Kangaroo typically follows a similar line of action: We have to set up our experimental playground in which the magic can happen. The most important takeaway is, that we basically rebuild our model with Kangaroo components. They are called goals and each goal brings a certain energy into the system. The Kangaroo solver then tries to find the state in which the sum of all energies acting in the system is as low as possible. Every geometry or behavior that we don’t remodel will not be part of our physical simulation. This may sound obvious, but it’s the most common reason why we don’t get what we anticipated.

This tutorial needs the following plugins:


In this introductory example, we will create a four-point sail, which is an architectural membrane fixed to four points, two high and two low points. We will turn those four points into anchors, find a representation for the membrane and introduce tension to find the typical shape of a stretched fabric.


Create basic geometry

To generate the four points for our sail, we will create a Center Boxand provide dimensions for each direction. Then, we use Box Cornersto get all vertices of this box. With Merge, we can select those four vertices that will be our anchors (we have to connect them either clockwise or counterclockwise).

We will then create a mesh between our four points with Construct Mesh, to set the base for our membrane. Next, we use Element* Catmull Clark SubdivisionYou could also use Weaverbird's Catmull-Clark Subdivisionto subdivide the mesh into a higher density of mesh cells (in this case 4 iterations). The component Mesh Edgeswill compute the edges of all cells and sort them by their position: at output E1 we get the naked edges (those at the edges of the whole mesh) and at output E2 we get the interior edges.


Reconstruct geometry as goals

With the completion of step 1, we have a geometrical description of all our objects, and we will now construct a goal for each element that needs to be included in our physical model. We start with the four points and connect them to an Anchorcomponent; they will become fixed points.

Architectural membranes are not connected to the supports directly, but to an edges cable that is used to stretch the membrane and carry the loads to the supports. To simulate the edge cable, we attach the naked edges to a Length(Line)component and set the Strength to 1000. This component’s goal is to assign all inputted Lines the provided Length. If no length is provided, the original length is used.

For all interior edges we calculate their initial length with Lengthand then use Multiplicationtogether with a Number Sliderto calculate the reduced lengths. We then combine everything in another Length(Line)component and set the Strength to 10.

What will happen during the calculation is that the solver tries to satisfy all goals, but because they are opposed, it cannot. Thus, the stronger goals will have a greater impact. In this case, the edge cables want to keep their length and the interior edges try to shorter themselves. As the strength of the edge cables is higher, their objective is also ranked higher, and they will deform less than the interior edges. The fix points, by default, have a Strength of 10000 and therefore they deviate fewest of all.

For visualization purposes we also add a Showcomponent to our subdivided mesh. Technically speaking, this is not a goal, but it will pass our mesh into the solver and we get the deformed mesh as an output.


Solve physical interaction

Now, we have all pieces of the puzzle and we will let Kangaroo Physics solve it by finding an equilibrium. All goals are connected to the input GoalObjects of a Solvercomponent. We have to flatten this input to make sure all goals are in the same data branch. We also need a Buttoncomponent for input Reset and a Boolean Togglecomponent for input On.

When the toggle is switched to True the solver is iterating and the current number of iterations can be found at output I. The message underneath the component states the current status of the solver, whether it is paused, running or has converged. At output O, we find our form-found objects.

Get the results

Version Info

Test your skills

As mentioned in the side note, we actually applied tension to the membrane by giving it the goal to become smaller. In reality, we would move the support nodes outwards. Now it’s your turn to model this behavior within Kangaroo.

Hint 1

Move supports outward

We start with moving the fixed points outward. This can be done by calculating the center point of the box with Volumeand then we construct a Vector 2Ptbetween the center and each support vertex.

We use a Movecomponent, to move the points. The translation vector is set with an Amplitudecomponent, together with a Number Slider, to calculate the distance for the points to travel.

Next, we have to implement this setup somehow as goals for Kangaroo.

Hint 2

Set new supports as target

The artificial shortening of our interior edges is no longer needed and can be removed.

If we connect our displaced points as new anchor points, there would be no physical connection between them and the rest of our model. Thus, we add them as target T to our existing Anchorcomponent.

After hitting the reset button, we get the new form-found membrane.

Get the results

Get the results

Get the results

Version Info

This page is open source. Edit it on GitHub or see how you can contribute.