Description Usage Arguments Details Author(s) See Also Examples
Various utilities for knots including reading files and creating objects
1 2 3 4 5 6 7 8 9 10 11 |
x |
Suitable object for coercion; see details |
a |
An |
b |
A controlpoints object |
k |
An object of class knot |
vec |
A vector of reals |
Functions inkscape()
, minobj()
, and knotvec()
are
low-level functions; these are the only places that objects have their
classes assigned directly. These functions are not user-friendly and
require very specific types of object; they perform some checks but
are not really intended for the user. Functions as.foo()
are
much more user-friendly, and are documented at as.Rd
.
Functions make_foo_from_bar()
coerce bar
objects into
foo
objects. Functions that involve symmetry are documented at
symmetry.Rd
.
Objects of class inkscape
are in the form of a two-column
matrix, with rows corresponding to 2D positions. The rows correspond
to the (x,y) coordinates of points as held in the inkscape file.
There is quite a lot of redundancy in an inkscape object:
The first row of an inkscape object is equal to the last row (this follows from the fact that the path is closed).
If n=0 modulo 3, then
a[n+2,]-a[n+1,]==a[n+1,]-a[n]
, corresponding to the fact that
the handles are symmetric in inkscape. This is visualised best by
knotplot2(k4_1,ink=TRUE,seg=TRUE)
Look at functions make_inkscape_from_minobj()
and
make_minobj_from_ink()
to see this from a symbolic
perspective. The vignette also gives some details.
The minobj
class is a ‘MINimal OBJect’; there
is no redundancy. Objects of class minobj
are a list
of two elements: $node
and $handle_A
. Each element has
rows corresponding to 2D positions, the same as inkscape
objects. Element $node
shows the positions of the nodes, and
element $handle_A
shows the positions of (one of) the handles;
the other handle is symmetrically positioned with respect to its node.
Use knotplot2(k4_1,node=TRUE,seg=TRUE)
to see the meaning
of the entries; the nodes are indicated by a square and the handles by
circles.
An object of class controlpoints
is a list of matrices of size
4-by-2. For each matrix, the four rows correspond to the points in
2D Cartesian space needed to specify a Bezier curve; further details
and examples are given in bezier.Rd
.
The knotvec
class is a named vector of independent
reals suitable for use with optimization routines.
None of the functions here deal with symmetry relations. This is
documented at symmetry.Rd
.
Robin K. S. Hankin
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.