Knot-class: Class "Knot" - a container for knot and link coordinates and...

Description Objects from the Class Note See Also Examples

Description

This is the main class for the present package.

Objects from the Class

Objects should be created with calls to newKnot.

Note

Note: This is a summary for reference. For a detailed explanation, please see the vignette. The slot points3D contains the 3D coordinates of points of a polygonal knot or link as an N x 3 matrix. The slot ends contains a vector of link separators. This is automatically set to numeric(0) for knots.

See Also

newKnot, makeExampleKnot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# create an object of class 'Knot' by using new
link <- makeExampleKnot( k = FALSE )
new('Knot', points3D = link$points3D, ends = link$ends)

#or by means of the constructor
newKnot(points3D = link$points3D, ends = link$ends)

#for knots, it is sufficient to specify the 3D coordinates
#ends are set by default to numeric(0)
knot <- makeExampleKnot( k = TRUE )
newKnot(points3D = knot)

#for creating an example, use makeExampleKnot.
#knot: 
makeExampleKnot(k = TRUE)
#link:
makeExampleKnot(k = FALSE)

Example output

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 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 
An object of class 'Knot' 
Slot points3D:  126 x 3 matrix 
           [,1]      [,2]      [,3]
 [1,] -8.864962 -3.784463 -0.697392
 [2,] -9.016251 -2.799890 -0.076988
 [3,] -8.908614 -1.811430  0.546106
 [4,] -8.574942 -0.845992  1.124651
 [5,] -8.049916  0.088350  1.609015
 [6,] -7.369714  0.993990  1.942388
 [7,] -6.579783  1.873020  2.061087
 [8,] -5.747097  2.721254  1.906809
 [9,] -4.965837  3.535403  1.460417
[10,] -4.328989  4.344170  0.784700
       ........  ........  ........ 
Slot ends:  90An object of class 'Knot' 
Slot points3D:  126 x 3 matrix 
              x         y         z
 [1,] -8.864962 -3.784463 -0.697392
 [2,] -9.016251 -2.799890 -0.076988
 [3,] -8.908614 -1.811430  0.546106
 [4,] -8.574942 -0.845992  1.124651
 [5,] -8.049916  0.088350  1.609015
 [6,] -7.369714  0.993990  1.942388
 [7,] -6.579783  1.873020  2.061087
 [8,] -5.747097  2.721254  1.906809
 [9,] -4.965837  3.535403  1.460417
[10,] -4.328989  4.344170  0.784700
       ........  ........  ........ 
Slot ends:  90An object of class 'Knot' 
Slot points3D:  121 x 3 matrix 
              x         y         z
 [1,] -8.615182 -1.002473  1.459459
 [2,] -8.457487  0.089965  1.023152
 [3,] -8.126496  1.068172  0.447261
 [4,] -7.643940  1.942456 -0.181845
 [5,] -7.013998  2.740401 -0.783369
 [6,] -6.230820  3.484017 -1.272333
 [7,] -5.297469  4.173304 -1.553731
 [8,] -4.252953  4.781513 -1.531999
 [9,] -3.191998  5.279393 -1.145286
[10,] -2.239980  5.707341 -0.419780
       ........  ........  ........ 
Slot ends:              [,1]      [,2]      [,3]
  [1,] -8.284165 -2.372934 -1.080302
  [2,] -8.340719 -1.387853 -0.420984
  [3,] -8.195005 -0.416621  0.236891
  [4,] -7.868954  0.540760  0.844848
  [5,] -7.374681  1.486311  1.351528
  [6,] -6.726328  2.417724  1.694603
  [7,] -5.955056  3.323456  1.801652
  [8,] -5.126942  4.185041  1.604290
  [9,] -4.347302  4.996133  1.079144
 [10,] -3.722033  5.819919  0.324608
 [11,] -3.238437  6.775858 -0.385205
 [12,] -2.707231  7.847791 -0.775025
 [13,] -1.967411  8.839797 -0.762329
 [14,] -1.007720  9.526237 -0.420984
 [15,]  0.080082  9.756206  0.093486
 [16,]  1.164710  9.482955  0.592663
 [17,]  2.117475  8.767661  0.891015
 [18,]  2.855275  7.775943  0.837923
 [19,]  3.405524  6.743253  0.374525
 [20,]  3.945386  5.856853 -0.386070
 [21,]  4.635578  5.100296 -1.150995
 [22,]  5.441186  4.329601 -1.677872
 [23,]  6.257470  3.478403 -1.895144
 [24,]  6.995272  2.559110 -1.821566
 [25,]  7.590533  1.599709 -1.509363
 [26,]  7.999397  0.621552 -1.022882
 [27,]  8.192142 -0.361798 -0.429640
 [28,]  8.148861 -1.340820  0.201400
 [29,]  7.859165 -2.304261  0.796662
 [30,]  7.322189 -3.234231  1.276218
 [31,]  6.554668 -4.097259  1.551487
 [32,]  5.605655 -4.842851  1.531001
 [33,]  4.571810 -5.425993  1.145220
 [34,]  3.580092 -5.900644  0.401071
 [35,]  2.689075 -6.497926 -0.446953
 [36,]  1.754778 -7.251596 -0.957960
 [37,]  0.715739 -7.959101 -1.006724
 [38,] -0.369178 -8.470108 -0.697695
 [39,] -1.465636 -8.710464 -0.188420
 [40,] -2.561518 -8.625343  0.376834
 [41,] -3.608347 -8.162811  0.866777
 [42,] -4.492150 -7.315942  1.152145
 [43,] -5.056249 -6.176202  1.122137
 [44,] -5.177437 -4.956825  0.715293
 [45,] -4.868697 -3.935964 -0.052516
 [46,] -4.289017 -3.315888 -1.066741
 [47,] -3.516014 -3.074667 -2.097411
 [48,] -2.485631 -2.928665 -2.869838
 [49,] -1.268274 -2.601459 -3.153185
 [50,] -0.150752 -2.016008 -2.827999
 [51,]  0.511452 -1.244159 -1.975070
 [52,]  0.491542 -0.401617 -0.910639
 [53,] -0.149309  0.464008 -0.088007
 [54,] -1.128620  1.287217  0.186973
 [55,] -2.176314  1.954038 -0.087141
 [56,] -3.143507  2.479183 -0.692213
 [57,] -4.063954  3.036646 -1.320946
 [58,] -4.976612  3.775601 -1.716825
 [59,] -5.794050  4.699800 -1.737311
 [60,] -6.373442  5.715178 -1.355571
 [61,] -6.593022  6.688718 -0.641718
 [62,] -6.392486  7.487401  0.267476
 [63,] -5.783086  8.006200  1.199177
 [64,] -4.842729  8.189136  1.973046
 [65,] -3.702989  8.041978  2.429519
 [66,] -2.526316  7.641482  2.454622
 [67,] -1.470541  7.132784  2.011711
 [68,] -0.630885  6.710070  1.163687
 [69,]  0.028144  6.555411  0.076462
 [70,]  0.676497  6.743253 -1.015669
 [71,]  1.494225  7.193377 -1.878408
 [72,]  2.532686  7.729487 -2.341229
 [73,]  3.704742  8.157971 -2.331996
 [74,]  4.851407  8.328212 -1.883602
 [75,]  5.805037  8.159127 -1.110887
 [76,]  6.431172  7.643790 -0.178321
 [77,]  6.650753  6.839625  0.730297
 [78,]  6.451370  5.853679  1.440110
 [79,]  5.891600  4.823585  1.811751
 [80,]  5.089166  3.891883  1.767893
 [81,]  4.195840  3.176588  1.313728
 [82,]  3.344065  2.734831  0.539283
 [83,]  2.580873  2.529966 -0.410019
 [84,]  1.816236  2.411376 -1.377500
 [85,]  0.910216  2.165827 -2.195516
 [86,] -0.134305  1.641835 -2.658913
 [87,] -1.126600  0.831610 -2.586778
 [88,] -1.772068 -0.142218 -1.952275
 [89,] -1.797171 -1.183277 -1.053179
 [90,] -1.265388 -2.282909 -0.431949
 [91,] -0.526145 -3.370134 -0.164470
 [92,]  0.128845 -4.470055  0.237756
 [93,]  0.618789 -5.490338  0.972095
 [94,]  1.166730 -6.469360  1.678157
 [95,]  1.970318 -7.444631  1.962082
 [96,]  2.967230 -8.206670  1.704414
 [97,]  3.977414 -8.532145  0.999795
 [98,]  4.807837 -8.316316  0.062323
 [99,]  5.308168 -7.590344 -0.852643
[100,]  5.405407 -6.501100 -1.503881
[101,]  5.122059 -5.274509 -1.715959
[102,]  4.571233 -4.154102 -1.421935
[103,]  3.907876 -3.327430 -0.689616
[104,]  3.221724 -2.859415  0.296619
[105,]  2.461127 -2.699563  1.317191
[106,]  1.521059 -2.791319  2.175314
[107,]  0.402383 -3.130933  2.684590
[108,] -0.744859 -3.695032  2.688918
[109,] -1.687525 -4.375990  2.140400
[110,] -2.268648 -5.007896  1.156473
[111,] -2.678666 -5.503034 -0.023374
[112,] -3.357027 -5.890546 -1.116947
[113,] -4.368943 -6.021832 -1.920824
[114,] -5.519070 -5.760702 -2.353636
[115,] -6.587252 -5.150724 -2.412787
[116,] -7.429216 -4.311934 -2.158871
[117,] -7.991872 -3.360323 -1.684220
[118,] -8.284165 -2.372934 -1.080302
$points3D
            [,1]      [,2]      [,3]
  [1,]  0.753489 -9.010054 -1.169336
  [2,] -0.395475 -9.085058 -1.253493
  [3,] -1.531727 -8.945220 -1.396891
  [4,] -2.614332 -8.604013 -1.598005
  [5,] -3.609983 -8.083305 -1.853019
  [6,] -4.493000 -7.407504 -2.153037
  [7,] -5.244569 -6.598220 -2.480005
  [8,] -5.850960 -5.673759 -2.805193
  [9,] -6.303274 -4.650650 -3.088938
 [10,] -6.596172 -3.549230 -3.282932
 [11,] -6.731180 -2.400011 -3.337851
 [12,] -6.717705 -1.245708 -3.209962
 [13,] -6.576849 -0.139203 -2.873078
 [14,] -6.340649  0.868652 -2.326437
 [15,] -6.047751  1.749126 -1.599530
 [16,] -5.732733  2.514679 -0.746261
 [17,] -5.408307  3.218957  0.163707
 [18,] -5.045236  3.919930  1.054352
 [19,] -4.585039  4.642768  1.862365
 [20,] -3.976614  5.371454  2.540963
 [21,] -3.199112  6.057172  3.059891
 [22,] -2.259397  6.632798  3.405165
 [23,] -1.191538  7.028414  3.577548
 [24,] -0.052744  7.187067  3.588481
 [25,]  1.083254  7.078503  3.455762
 [26,]  2.140180  6.707803  3.200747
 [27,]  3.055995  6.112853  2.842506
 [28,]  3.797139  5.352386  2.396802
 [29,]  4.364121  4.490471  1.874823
 [30,]  4.793299  3.581266  1.288518
 [31,]  5.147980  2.655535  0.657719
 [32,]  5.486389  1.717345  0.022089
 [33,]  5.819460  0.746102 -0.560911
 [34,]  6.104221 -0.285144 -1.038396
 [35,]  6.281435 -1.383766 -1.378585
 [36,]  6.304827 -2.525612 -1.573342
 [37,]  6.153038 -3.669745 -1.636651
 [38,]  5.823274 -4.775487 -1.599022
 [39,]  5.322906 -5.810293 -1.499101
 [40,]  4.662359 -6.747720 -1.374771
 [41,]  3.854346 -7.563360 -1.259341
 [42,]  2.915648 -8.230263 -1.177472
 [43,]  1.870927 -8.720461 -1.144928
 [44,]  0.753489 -9.010054 -1.169336
 [45,] -9.405938  2.006854  1.115181
 [46,] -8.996222  0.956717  1.429188
 [47,] -8.351371 -0.008345  1.577773
 [48,] -7.519533 -0.831616  1.545870
 [49,] -6.555948 -1.469674  1.343523
 [50,] -5.508470 -1.899181  1.017405
 [51,] -4.397778 -2.120138  0.661747
 [52,] -3.221802 -2.145247  0.424543
 [53,] -2.007130 -2.004933  0.461763
 [54,] -0.824064 -1.791066  0.820670
 [55,]  0.278948 -1.640118  1.391082
 [56,]  1.308111 -1.590786  2.029140
 [57,]  2.318664 -1.580743  2.642974
 [58,]  3.362892 -1.529048  3.166122
 [59,]  4.454679 -1.373079  3.540095
 [60,]  5.565372 -1.076500  3.720878
 [61,]  6.638844 -0.626906  3.684248
 [62,]  7.608338 -0.033453  3.428139
 [63,]  8.410340  0.679339  2.969979
 [64,]  8.991385  1.473957  2.340783
 [65,]  9.313664  2.303136  1.581908
 [66,]  9.357974  3.114592  0.739731
 [67,]  9.125793  3.855153 -0.137598
 [68,]  8.639569  4.476077 -1.004292
 [69,]  7.939477  4.940145 -1.822247
 [70,]  7.076919  5.224908 -2.564579
 [71,]  6.104471  5.325343 -3.214453
 [72,]  5.067333  5.250312 -3.763300
 [73,]  3.996519  5.018721 -4.199011
 [74,]  2.909458  4.653905 -4.495884
 [75,]  1.820034  4.182157 -4.607840
 [76,]  0.756014  3.638331 -4.472844
 [77,] -0.223228  3.069987 -4.034474
 [78,] -1.029661  2.537091 -3.281212
 [79,] -1.587075  2.092814 -2.271250
 [80,] -1.895765  1.751926 -1.115952
 [81,] -2.055574  1.460664  0.085722
 [82,] -2.172256  1.090532  1.271446
 [83,] -2.262057  0.489399  2.358507
 [84,] -2.280372 -0.412743  3.209250
 [85,] -2.184368 -1.547658  3.683067
 [86,] -1.950413 -2.751401  3.700495
 [87,] -1.580281 -3.828714  3.266853
 [88,] -1.104101 -4.603836  2.464850
 [89,] -0.578295 -4.961266  1.436573
 [90,] -0.063713 -4.884167  0.345376
 [91,]  0.409513 -4.433687 -0.668721
 [92,]  0.839021 -3.671563 -1.486085
 [93,]  1.213880 -2.667508 -2.002143
 [94,]  1.507799 -1.530525 -2.165793
 [95,]  1.694195 -0.367548 -2.012778
 [96,]  1.747070  0.772389 -1.655938
 [97,]  1.628912  1.904055 -1.248290
 [98,]  1.301316  3.035721 -0.941373
 [99,]  0.757195  4.117465 -0.834439
[100,]  0.029337  5.072484 -0.940191
[101,] -0.839129  5.851150 -1.191574
[102,] -1.821030  6.440466 -1.489630
[103,] -2.897751  6.842502 -1.743671
[104,] -4.043301  7.054006 -1.888415
[105,] -5.215141  7.066708 -1.884280
[106,] -6.358327  6.870565 -1.717381
[107,] -7.408463  6.461735 -1.395989
[108,] -8.301744  5.849082 -0.948167
[109,] -8.981157  5.054760 -0.418225
[110,] -9.404461  4.115397  0.140371
[111,] -9.547433  3.080326  0.669723
[112,] -9.405938  2.006854  1.115181

$ends
[1] 44

Rknots documentation built on May 29, 2017, 1:38 p.m.