I can’t help myself starting this post with a shameless plug. Over the last few months I’ve been doing work for various people around the world, mostly helping them model things to be printed by Shapeways. I’ve been excited by the variety of interesting projects this has led to, giving me opportunities to hone my skills with Rhino, Grasshopper, T-splines, and Meshmixer. Among other things I’ve helped make earrings for a designer in London, a pendant for an artist in Maine, an engraved memorial ring for a doctor in Arizona, and some custom-shaped dice for a motivational speaker in Northern California.

Recently I’ve decided to make this little side-business official and incorporate with the state of California. So I am now proud to officially be “David Bachman Design, Inc.” You can find a little more information about this here. Feel free to contact me with any design ideas!

Now on to today’s post…

There have been several occasions where I’ve wanted to model a knot for either decorative or functional purposes. The first was for a simple pendant which was a trefoil knot in a heart shape. Since then I’ve had to model more complicated knots, including Celtic knots and Chinese knots. In a previous post I discussed some experiments using Kangaroo to minimize the rope-length of a knot, and I needed some random-ish knots just to test my minimization algorithm.

Some knots (e.g. *torus knots* and *Lissajous knots*) are “easy” to make if you have a solid knowledge of trigonometry and parameterized curves. However, often I find these kinds of knots too restrictive.

Unfortunately, for mathematical reasons, “random” knots are hard to freehand draw. For one thing, it is difficult to guarantee that you haven’t made a “slip-knot” that will just come apart if the right strand is tugged on. One solution I’ve come up with is a Grasshopper script that will convert a free-hand drawn curve in the xy-plane to a knot by alternately lifting and lowering it at each place where it crosses itself. The result is called an *alternating knot*, and such knots are guaranteed to never come apart.

This script can be found here. I will briefly describe how it works. First, the user must draw a curve in the xy-plane, and set the left-most component of the script to reference it.

The first phase of the script shifts the initial point of the curve to lie half-way between two self-intersection points.

Then the fun starts. The script uses the “Curve|Self” component to make a list of all the places where the curve crosses itself. It then adds to this list a point on the curve between each pair of consecutive self-intersection points. The self-intersection points are then alternately raised/lowered, while the points in between are kept at height 0. The final step is to create a new interpolated curve through this modified list of points, and put a tube around it.

Here is the resulting knot for the initial curve shown above:

Finally, it’s nice to combine techniques. Here’s a pretty knot I made by using some trigonometry to parametrize a curve in the plane. I then used the above script to make it alternate.