Knot Theory with Rhino, Grasshopper and Kangaroo

Knots have always fascinated me. When I was young I used to get books about knot-tying from the public library and carry around some rope to practice. I enjoyed the challenge and beauty of tying a complicated decorative knot. Once when I was out in public a stranger saw me and said “If you like tying knots, you should be a topologist!”

I didn’t know what a Topologist was at the time. Now I know that it’s a branch of Mathematics that includes an area called “Knot Theory.” About 20 years after meeting that stranger I got a PhD in Topology.

Now that I’m thinking about the interactions between Math and Art, I’ve come full circle (so to speak) to revisiting knots as decorative objects. This time around I can leverage my knowledge of mathematics to help me create them. In a future post I’ll share more of my knot-based designs like the pendant pictured below, and how they were made.

625x465_7165574_2972052_1459322033Right now, though, I’m excited to talk about how the pendulum has swung back yet again: I’ve discovered that the software I use for my sculptural designs can be useful for studying Topology!

As I’ve mentioned before, most of my geometric modeling is done with Rhino3D, a CAD program used by most of the artists, architects, and academics I know who do this sort of thing. When the object is more mathematical (as most of mine are) I’ll usually turn to a Rhino plug-in called Grasshopper, which is essentially a visual programming language. Recently I’ve started playing with Daniel Piker’s Grasshopper add-on called “Kangaroo,” which gives Grasshopper objects physical properties such as elasticity, and allows you to apply many kinds of forces to them. A lot has been written about how this creates a new kind of design paradigm: rather than designing the finished product, you set up initial geometry and subject it to a set of physical rules which forces that geometry to evolve.

One of the ways in which Mathematicians study knots is to put them into a “nice” position. What that actually means, in practice, is a very difficult question. One strategy is to imagine the knot is made up of electrical charges that repel each other, so that the knot tries to spread itself out as much as possible, while keeping its total length fixed. I think this is how Rob Scharein’s software KnotPlot basically works.

An alternate strategy is to imagine keeping the radius of the rope used to tie the knot fixed, while shrinking its length as much as possible. This process is called “Rope Length Minimization.” After a few days of experimenting, I’ve been able to implement this with Rhino/Grasshopper/Kangaroo! Here’s a little animation of a randomly drawn knot shrinking to it’s rope-length minimizer:

If anyone out there wants to play with this, the Grasshopper definition can be found here.

The “Figure-8” knot is the second simplest knot you can draw. One of the basic facts about the Figure-8 knot is that it is amphichiral, meaning that it can be continuously deformed to look like its mirror image. (Surprisingly, the only simpler knot, the trefoil, does not have this property.) A test of any software is if it can detect whether two knots are the same or not, and in particular the Figure-8 and it’s mirror-image. Here’s a screen shot taken after applying my Roplength Minimizing grasshopper definition to both:

Screen Shot 2016-05-02 at 3.31.50 PM

The Grasshopper definition works by converting the knot into a set of straight lines (i.e. finding a polygonal approximation). Then it converts each of those lines to a spring with zero rest length. At the same time, a set of forces are applied that keep every segment of the knot at least one unit of distance away from every other segment (unless the two segments have a common endpoint). The program is then put into motion while the strength of each spring is gradually increased.

I’m excited to play with Kangaroo as a way to model topological phenomena. Next I’ll be moving on to hyperbolic surfaces, like the ones in Daniel Piker’s Kangaroo experiments shown here.

1 thought on “Knot Theory with Rhino, Grasshopper and Kangaroo

Leave a Reply