Learn R Programming

Rknots (version 1.3.2)

newKnot: Create a Knot object

Description

This function creates a knot object from a matrix of 3D points coordinates and a vector of separators (for links)

Usage

newKnot(points3D, ends)

Arguments

points3D
An $N$ x 3 matrix containing the $x$, $y$, $z$ coordinates of points of a polygonal knot or link. Each row then contains the 3D coordinates of a single point of the structure.
ends
A vector of integers containing the separators of the link components. A separator can be seen as the index of the edge that if not removed would connect a component with the following. This slot is automatically set to numeric(0) for knots

Value

an object of class Knot

See Also

Knot-class, makeExampleKnot

Examples

Run this code
knot <- makeExampleKnot(k = TRUE)
newKnot(knot)

link <- makeExampleKnot(k = FALSE)
newKnot(link$points3D, link$ends)

Run the code above in your browser using DataLab