Generating knitting patterns from a sketch: a CSP approach

  • Authors:
  • Marta Kryven;Elodie Fourquet

  • Affiliations:
  • University of Waterloo;University of Waterloo

  • Venue:
  • Proceedings of the Symposium on Computational Aesthetics
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

Graphic patterns in knitting are composed of relatively large pixels and create a picture when seen from a distance, while on close viewing the image falls apart into its constituent stitches. Such patterns are constrained in use of colors due to the nature of the medium and in spacing between pixels as a durability concern and are a challenge to create. This paper shows how to convert an arbitrary line-drawing or photograph to a constraint-compliant Fair-Isle knitting pattern for a programmable knitting machine or a manual knitter by formulating it as a Constraint Satisfaction Problem (CSP). First we generate a constraint-inconsistent starting pixel assignment. Then we produce a perceptually similar constraint compliant solution, by minimizing and randomly distributing pixel flips to preserve gestalt features of the original design. We evaluate ways of generating a starting assignment using thresholding and dithering and of solving the problem using pseudo-random texturing and search: Random Walk, GSAT and Min-Conflict. Two hybrid solutions that achieve an improved design-dependent result are described. To test the algorithms an interactive knitting pattern generator was implemented.