getstringpoints: Returns the coordinates of a knot's path

getstringpointsR Documentation

Returns the coordinates of a knot's path

Description

Returns the coordinates of a knot's path

Usage

getstringpoints(b, give_strand = FALSE, n = 100)

Arguments

b

The knot path (coerced to controlpoints form)

give_strand

Boolean, with default FALSE meaning to return a two-column matrix with rows corresponding to coordinates of the knot path, and TRUE meaning to return a matrix with an additional column indicating the strand number

n

The number of points to use when constructing the Bezier curve

Value

Returns either a two- or three- column matrix

Note

Function knotplot() returns the points of the string too, but with NA for understrands.

Author(s)

Robin K. S. Hankin

See Also

knotplot

Examples

plot(getstringpoints(k4_1),asp=1)

a <- getstringpoints(k11a179,TRUE)
plot(a,asp=1,col=rainbow(24)[a[,3]])
 
d <- 1200
plot(rbind(
    sweep(getstringpoints(k7_1),2,c(0,0)),
    sweep(getstringpoints(k7_2),2,c(0,d)),
    sweep(getstringpoints(k7_3),2,c(d,0)),
    sweep(getstringpoints(k7_4),2,c(d,d))
),asp=1,xlab='',ylab='')


knotR documentation built on June 22, 2024, 6:56 p.m.