celticKnots: Celtic Knots

celticKnotsR Documentation

Celtic Knots

Description

Functions to draw Celtic knots.

Usage

startCelticRibbon(layer)

celticBezierCurve(layer)

loopToRibbon(layer)

reorderCelticKnotComponents(layer)

makeCelticCurve(
  lineOrder = c("A", "D", "H", "L", "M", "I", "F", "B", "C", "G", "K", "N", "J", "E"),
  angles = data.frame(angleNumber = c(1:5, 7:12, 14), inAngle1 = pi * c(1/2, 1/4, 0,
    -1/4, 1, 3/4, -1/2, -1/4, 0, 1/4, 1, -3/4), inAngle2 = pi * c(1/4, 0, -1/4, -1/2,
    3/4, 1, -1/4, 0, 1/4, 1/2, -3/4, 1), stringsAsFactors = FALSE),
  basis = data.frame(names = LETTERS[1:14], x = c(1, 1, 3, 3, 5, 5, 6, 6, 7, 7, 9, 9,
    11, 11), y = c(1, 7, 3, 5, 3, 5, 1, 7, 3, 5, 3, 5, 1, 7), stringsAsFactors = FALSE),
  knotOrder = c(1, 3, 5, 7, 9, 11, 13, 2, 4, 6, 8, 10, 12, 14),
  knotFillColour = list("white"),
  knotBorderColour = "black",
  clockWiseCorners = c(1:5, 8:12),
  flipCorners = c(13, 14),
  distance = 0.2,
  knotMode = "DEFAULT",
  ...
)

Arguments

layer

A layer object that represents the celtic knot. Components will be sections of the ribbons.

lineOrder

??

angles

??

basis

data.frame containing information about the anchor points of the knot.

knotOrder

??

knotFillColour

The colour of the knot

knotBorderColour

The colour of the knot line border

clockWiseCorners

??

flipCorners

??

distance

gives the distance of line(s) from the middle of the ribbon. This controls the width of the ribbons.

knotMode

controls the style of a knot. Options are "DEFAULT", "INNERRIBBON" and "DOUBLE". Default is one ribbon, innerribbon is one ribbon inside another, double is two parallel ribbons.

...

parameters passed to the layer and the layer function object. See "details" for more information.

Details

A series of functions to draw celtic knots.

Value

a celtic knot

Examples

print(1+1)

R-graphic-design/RGD documentation built on Jan. 2, 2023, 10:30 p.m.