Table of Contents
Fetching ...

A Graph Model and a Layout Algorithm for Knitting Patterns

Kathryn Gray, Brian Bell, Stephen Kobourov

TL;DR

This paper designs, implements, and evaluates a layout algorithm to design, implement, and evaluate a layout algorithm to visualize knitting patterns as planar graphs, and quantitatively evaluates the algorithm using real knitting patterns of various sizes against three others.

Abstract

Knitting, an ancient fiber art, creates a structured fabric consisting of loops or stitches. Publishing hand knitting patterns involves lengthy testing periods and numerous knitters. Modeling knitting patterns with graphs can help expedite error detection and pattern validation. In this paper, we describe how to model simple knitting patterns as planar graphs. We then design, implement, and evaluate a layout algorithm to visualize knitting patterns. Knitting patterns correspond to graphs with pre-specified edge lengths (e.g., uniform lengths, two lengths, etc.). This yields a natural graph layout optimization problem: realize a planar graph with pre-specified edge lengths, while ensuring there are no edge crossings. We quantitatively evaluate our algorithm using real knitting patterns of various sizes against three others; one created for knitting patterns, one that maintains planarity and optimizes edge lengths, and a popular force-directed algorithm.

A Graph Model and a Layout Algorithm for Knitting Patterns

TL;DR

This paper designs, implements, and evaluates a layout algorithm to design, implement, and evaluate a layout algorithm to visualize knitting patterns as planar graphs, and quantitatively evaluates the algorithm using real knitting patterns of various sizes against three others.

Abstract

Knitting, an ancient fiber art, creates a structured fabric consisting of loops or stitches. Publishing hand knitting patterns involves lengthy testing periods and numerous knitters. Modeling knitting patterns with graphs can help expedite error detection and pattern validation. In this paper, we describe how to model simple knitting patterns as planar graphs. We then design, implement, and evaluate a layout algorithm to visualize knitting patterns. Knitting patterns correspond to graphs with pre-specified edge lengths (e.g., uniform lengths, two lengths, etc.). This yields a natural graph layout optimization problem: realize a planar graph with pre-specified edge lengths, while ensuring there are no edge crossings. We quantitatively evaluate our algorithm using real knitting patterns of various sizes against three others; one created for knitting patterns, one that maintains planarity and optimizes edge lengths, and a popular force-directed algorithm.
Paper Structure (16 sections, 1 equation, 7 figures, 6 tables, 2 algorithms)

This paper contains 16 sections, 1 equation, 7 figures, 6 tables, 2 algorithms.

Figures (7)

  • Figure 1: Example of different steps in the process of knitting. The far left is the written instructions that a knitter would work from. The center is the output of our algorithm. The far right is the final, knitted result.
  • Figure 2: An example of how we set up the graph. In (a), we see the graph set up from a single stitch, $S_n$. $S_n$ connects via yarn with stitches $S_l$ and $S_r$ and connects via loops to $S_a$ and $S_b$. On the right, in (b), we see an example of the complete graph. Here, we show the edges along the Hamiltonian path in dark gray, the arrow represents the order of the path. We show the edges not in the Hamiltonian path but in the Eulerian path in blue. In both figures, we color one of the rows in red for ease of seeing the row and individual stitches on that row.
  • Figure 3: Brioche knitting pattern made by holding 4 strands of yarn in 2 colors. Note that exterior stitches on the sides are connected i.e. "in the round."
  • Figure 4: Initialization with a planar layout, this is the pinecone lace knitting pattern.
  • Figure 5: An output from the algorithm, the knitting pattern is a triangle shawl.
  • ...and 2 more figures