One of the most exciting additions to Grasshopper 1.0 is the inclusion of the Kangaroo plugin as a set of native Grasshopper components. By popular demand, we are happy to bring Kangaroo 2 to ShapeDiver today! Read more below about this powerful plugin, and importantly about the precautions to take when using Kangaroo with ShapeDiver.
What Is Kangaroo?
Kangaroo is a physics engine for interactive simulation, form-finding, optimization and constraint solving inside Grasshopper. With a background in architectural design and a laser focus on state-of-the-art research, Kangaroo's creator Daniel Piker has brought an immensely powerful set of tools to Grasshopper. Optimization routines that usually require strong development skills and mathematical training are now available to parametric designers.
One noticeable feature of the Kangaroo plugin is its ability to perform live optimization and display iteration results while the algorithm progresses. Indeed during the optimization, the standard Kangaroo solver continually recomputes successive solutions until it converges:
This behaviour of Kangaroo is unfortunately not compatible with ShapeDiver. Due to its nature, the ShapeDiver viewer does not stream real-time information from Rhino. The viewer communicates with servers by sending a request and waiting for an answer from Grasshopper. In other words, a bijective relationship between a set of parameters and the resulting geometry is kept at all times.
For this reason, we have been cautious to start supporting the plugin. Fortunately, Kangaroo 2 provides several types of solvers with variable characteristics. Among them, one solver is the key to using Kangaroo with ShapeDiver...
The Zombie Solver
When using the Zombie Solver, optimization steps before the solver converges do not trigger and display new solutions in Grasshopper. This solver instead produces a single solution after the algorithm has stopped, while intermediate optimization steps perform inside the component. As a consequence, the Zombie solver behaves very much like a standard Grasshopper component, which is good news for ShapeDiver compatibility!
Instead of displaying intermediate results, the zombie solver has one more input parameter: a maximum number of steps to run during the optimization. The component stops then if it has not reached a goal within the defined tolerances. This additional parameter is useful in two cases:
By connecting a slider to it, one can witness the progression and get a glimpse at the behaviour of the optimization algorithm, somewhat like the standard solver does on its own.
More importantly, in the context of online configurators, it is possible to enforce a smaller number of iterations during the configuration process, before raising this limit when more precise data or geometry needs to be exported from the viewer.
An Example: Planar Quad Panels
This simple example addresses a common rationalization problem when designing free-form architecture with Rhino. Starting from a quad mesh that represents a facade, the goal is to ensure that as many panels in the facade as possible can be manufactured with planar elements (glass or metal panels, for example). Using Kangaroo, we enforce the planar constraint for all panels in the surface, while fixing the floor points to prevent them from drifting away. We also keep a constraint for the overall smoothness of the surface, in order to obtain a visually satisfying result.
In the model below, the color coding shows the level of planarity. Panels in green are considered planar according to the input tolerances. The initial surface clearly shows many non-planar panels. After enabling the Kangaroo solver, more panels become planar. With a few hundred iterations, the whole surface becomes planar and the goal is achieved.