plotKnot3D: 3D plot of a polygonal link

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

Description

3D plot of a polygonal link

Usage

1
plotKnot3D(points3D, ends = c(), text = FALSE, showNC = FALSE, colors = list(), ...)

Arguments

points3D

an N x 3 matrix of the x, y, z coordinates of a polygonal link

ends

a vector of positive integers defining the separators of the polygonal link. Default empty (polygonal knot)

text

logical, if TRUE the numbering of the points is shown

showNC

logical, if TRUE the N-terminus and C-terminus of a protein are labeled in red

colors

a list of color vectors, one for each component. Each vector i can be of length 1, containing the color to be used for the component i or of length equal to the number of points of the component i, thus specifying the color to be used for each edge. If not supplied, single colors from 1 to n are used, where n is the number of link components

...

other parameters for lines3d or spheres3d

Value

Called for its effect.

Note

This is a low-level function.

Author(s)

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

See Also

plotDiagram

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Not run: 
##3D plot of the Hopf link

hopf <- matrix(c(0.000084, -1.667027, -0.000300,
    0.179585, 0.249735, 0.991541,
    -0.179478, 0.250355, -0.991211,
    0.000084, -1.667027, -0.000300,
    -0.991561, -0.250457, 0.179413,
    -0.000415, 1.666817, 0.000107,
    0.991784, -0.249435, -0.179541,
    -0.991561, -0.250457, 0.179413),
    ncol = 3, byrow = TRUE)
			
plotKnot3D(hopf, ends = 4, text = FALSE, showNC = FALSE, lwd = 5, radius = 0.05)

##Stevedore knot
data(Rolfsen.table, package = "Rknots")
stevedore <- Rolfsen.table$"6.1"
plotKnot3D(stevedore, ends = c(), text = FALSE, showNC = FALSE, 
    radius = 0.05, lwd = 5)

#The same plot, without specifying any parameter for the rgl primitive shapes 
# (the default sphere radius is 1).
plotKnot3D(stevedore, ends = c(), text = FALSE)

## End(Not run)

Example output

sh: 1: cannot create /dev/null: Permission denied
Loading required package: rgl
Loading required package: rSymPy
Loading required package: rJython
Loading required package: rJava
Loading required package: rjson
Loading required package: bio3d
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl.init' failed, running with 'rgl.useNULL = TRUE'. 

Rknots documentation built on May 1, 2019, 10:19 p.m.