jamis / celtic_knot

A library for generating Celtic Knotwork designs from graphs

This URL has Read+Write access

jamis (author)
Mon Jun 01 08:32:17 -0700 2009
commit  bdf4e21f68c315d9fe0878f0025649a3c92640e3
tree    1a6ff5dbeea241fec55271b6bb7a1027dad94b97
parent  7f35b8a1e1a0897ddc39aa4a134018f4f298053d
name age message
file .gitignore Loading commit data...
file README.rdoc
directory examples/
directory lib/
README.rdoc

CelticKnot

CelticKnot is a library for generating celtic knots from graphs. The technique used is the one described by Christian Mercat[1], in which graphs are used as a kind of scaffolding for building celtic knots.

Features

  • Arbitrarily complex graphs as input
  • Input graphs may specify walls[2] on edges

Caveats

There are a lot of caveats in the current version of the code. The knot2svg example, which takes a simple graph definition as input and writes the resulting knot as an SVG file, currently uses an imperfect hack to render the cables with stroked borders; this hack results in gaps and "cracks" in the cables.

The algorithm itself has issues when the cables make tight bends, or when the cables are too thick for the space available.

Also, see examples/knots/mixed.knot to see what happens when the midpoint of a curve is blindly computed: you wind up with an curve segment that is too long and inadvertantly overlaps another segment.

TODO

Aside from fixing the multitude of bugs, I’d like to see the following features added eventually:

  • Shaped corners (e.g. pointed corners, or blunt, etc.)
  • Flourishes
  • Encapsulated knots (e.g., fill some arbitrary shape with knotwork)

License

CelticKnot is written by Jamis Buck (jamis@jamisbuck.org). The author hereby places this library into the public domain.

1
"Celtic Knotwork: the ultimate tutorial", www.entrelacs.net/
2
www.entrelacs.net/Walls