Skip to content

knot

5 motifs. Import them from geomotif.motifs, or build one by name with registry.create("knot.celtic-grid").

knot.celtic-grid

knot.celtic-grid

The plait: strands at 45 degrees, bouncing off the frame and off barriers.

from geomotif import save_svg
from geomotif.motifs import CelticGrid

motif = CelticGrid()
save_svg(motif.build(), "knot.celtic-grid.svg", width=320, height=320)
geomotif render knot.celtic-grid --out knot.celtic-grid.svg
{
  "geomotif": "1.3.1",
  "motif": "knot.celtic-grid",
  "params": {
    "cols": 4,
    "rows": 3,
    "size": 60.0,
    "breaks": [],
    "roundness": 0.55,
    "gap": 0.14,
    "center": [
      0.0,
      0.0
    ]
  }
}
Parameters
Name Type Default
cols int 4
rows int 3
size float 60.0
breaks tuple[tuple[int, int, str], ...] ()
roundness float 0.55
gap float 0.14
center Point (0.0, 0.0)

knot.circular

knot.circular

One strand wound several times round a ring, weaving with itself.

from geomotif import save_svg
from geomotif.motifs import CircularCelticKnot

motif = CircularCelticKnot()
save_svg(motif.build(), "knot.circular.svg", width=320, height=320)
geomotif render knot.circular --out knot.circular.svg
{
  "geomotif": "1.3.1",
  "motif": "knot.circular",
  "params": {
    "radius": 110.0,
    "amplitude": 34.0,
    "lobes": 5,
    "wraps": 2,
    "resolution": 48,
    "gap": 0.06,
    "center": [
      0.0,
      0.0
    ]
  }
}
Parameters
Name Type Default
radius float 110.0
amplitude float 34.0
lobes int 5
wraps int 2
resolution int 48
gap float 0.06
center Point (0.0, 0.0)

knot.endless

knot.endless

The endless knot: four strands each way, woven, with their ends looped back.

from geomotif import save_svg
from geomotif.motifs import EndlessKnot

motif = EndlessKnot()
save_svg(motif.build(), "knot.endless.svg", width=320, height=320)
geomotif render knot.endless --out knot.endless.svg
{
  "geomotif": "1.3.1",
  "motif": "knot.endless",
  "params": {
    "size": 220.0,
    "roundness": 0.4,
    "gap": 0.02,
    "center": [
      0.0,
      0.0
    ]
  }
}
Parameters
Name Type Default
size float 220.0
roundness float 0.4
gap float 0.02
center Point (0.0, 0.0)

knot.square

knot.square

The same winding, but round a square frame instead of a ring.

from geomotif import save_svg
from geomotif.motifs import SquareCelticKnot

motif = SquareCelticKnot()
save_svg(motif.build(), "knot.square.svg", width=320, height=320)
geomotif render knot.square --out knot.square.svg
{
  "geomotif": "1.3.1",
  "motif": "knot.square",
  "params": {
    "size": 220.0,
    "amplitude": 24.0,
    "lobes": 8,
    "wraps": 3,
    "squareness": 6.0,
    "resolution": 48,
    "gap": 0.035,
    "center": [
      0.0,
      0.0
    ]
  }
}
Parameters
Name Type Default
size float 220.0
amplitude float 24.0
lobes int 8
wraps int 3
squareness float 6.0
resolution int 48
gap float 0.035
center Point (0.0, 0.0)

knot.triquetra

knot.triquetra

The trinity knot: three arcs that turn out to be one strand.

from geomotif import save_svg
from geomotif.motifs import Triquetra

motif = Triquetra()
save_svg(motif.build(), "knot.triquetra.svg", width=320, height=320)
geomotif render knot.triquetra --out knot.triquetra.svg
{
  "geomotif": "1.3.1",
  "motif": "knot.triquetra",
  "params": {
    "radius": 90.0,
    "gap": 0.07,
    "rotation": -1.5707963267948966,
    "ring": false,
    "center": [
      0.0,
      0.0
    ]
  }
}
Parameters
Name Type Default
radius float 90.0
gap float 0.07
rotation float -1.5707963267948966
ring bool False
center Point (0.0, 0.0)