ASCII knots to 3D renderings via Blender

-

Knots are a pain to model in 3D. I mean “knots” as in the functional objects used to bind materials, like those Ashley wrote about, rather than mathematical knots, for which there are some nice tools available to produce renderings.

Such knots are also a pain to notate consistently in a form that can be shared over email or chat — people often end up discussing knots in terms of their Ashley numbers (ABOK #1010 is the Bowline, for example), which is fine if you (a) have a copy of the Ashley Book of Knots handy and (b) the knot is actually listed there. Many of the interesting knots noted at the Notable Knot Index, for example don't fall into that category. While the Notable Knot Index has nice illustrations, these are tricky to produce by hand and of course show only a single perspective on the construction.

I've devised a simple notation (knotation) for representing basic knots, and a plugin for Blender that will parse this notation and generate 3D models automatically. It only generates a starting point for modelling, with the correct topology and approximate geometry, but it is a useful helper.

   

Some example renderings

Examples of knots rendered from ASCII diagrams

   

Blender plugin

I have created a Blender plugin (2.7x/2.8x) to create 3D meshes of knots from these ASCII art descriptions. This is a simple plugin, which allows the creation of a knot mesh quickly. It generates Blender spline curves from the text, which can be extruded to build full 3D meshes. Generating a “good looking” knot with appropriate tension and curvature takes a bit of manual editing, but it is usually quick to do.

   

Installing the plugin

Download the package

See the readme for full details on installing and using the plugin.

   

Knotation:

The notation is a simple ASCII art representation of the path of the rope. The rope can go in each of the four cardinal directions (up, down, left, right), and can go beneath existing rope.

   

Examples

It's easier to first see some examples in the notation:

   

Reef knot

                 +--+
        >--------|-----+                            
                 |  +----------<
                 |     |
                 |  +---------->
        <--------|-----+
                 +--+
                 

   

Figure of 8

        
              +--+
              |  | 
        >-----|-----+
              |  |  |
              +--|----->
                 |  |
                 +--+

   

Bowline

              V
              |
              |
             /|-\
             \-\|
            /--||-\
            | \---/
            |  ||
            |  V|
            \---/

   

Leads

Every knot is represented as a collection of leads, where one a lead is a separate piece of rope. A simple overhand knot only has one lead; a bend will have at least two leads, and so on.

   

Lead characters

        ---------


        |
        |
        |
        
   
Under/over

A lead is assumed to continue underneath if it disappears without a corner symbol:

        V                   V
        |                   |
    >---|---             >------
        |                   |
    

This may continue for any number of steps:

         VVV
         |||
    >----|||----
         |||
         |||
                         
   

Corners

OK, unambiguous

      >----+
           |
           +----

                 |
       >--------++-<
                |

NOT OK: ambiguous

                  |
            >-----+
                  |

                 |
                 |
        >--------/       >----\
                              |
                 
   

Heads/tails

Indicates head of a lead, if facing a lead (i.e. before a - or |), or the tail if facing whitespace

        >---  [head]

        --->  [tail]

        V     [head and tail]
        |
        |
        V

Indicates start of a lead. Labels a lead with the given number. Only one digit permitted. Must neighbour exactly one lead cell so that direction is indicated.

        0---

        0
        |
        |

        ---.

        |
        |
        .
   

Comments/names

May appear anywhere on the lead excluding the end, including before the head or in place of the head. Always read left to right, regardless of line orientation. The lead must pass through the name to take effect. Can be used as a comment if not adjacent to a lead.

The Blender script does not use the names for anything at the moment.

    [a comment; this --- is ignored]
    
               V
               |
    [this has a lead through it and will name the lead]
               |
               .
    
            >[left]---> <---[right]<

            0
            |
            |
         [left]
            |
            |
            V


John H Williamson

GitHub / @jhnhw

formatted by Markdeep 1.18