newKnot: Create a Knot object

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/class_def.R

Description

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

Usage

1
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

Note

Note: This is a summary for reference. For a more detailed explanation, please see the vignette.

Author(s)

Federico Comoglio, federico.comoglio@bsse.ethz.ch

See Also

Knot-class, makeExampleKnot

Examples

1
2
3
4
5
knot <- makeExampleKnot(k = TRUE)
newKnot(knot)

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

FedericoComoglio/Rknots documentation built on May 6, 2019, 4:35 p.m.