R: Class "BezierCurve": A class to describe a Bezier curve
BezierCurve-class
R Documentation
Class "BezierCurve": A class to describe a Bezier curve
Description
This class is used to represent a Bezier curve in R,
which can then be used for other applications, plotted, etc
Objects from the Class
Objects can be created by calls of the form new("BezierCurve", ...).
Slots
cPoints:
Object of class "list": A list of
xyPoint objects, representing control points for the curve
Methods
cPoints:
Returns the cPoints slot
pointList:
Returns a list of all points having been
processed with teh getPoints method of xyPoint
bezierPoints:
Returns a matrix giving x & y points (by
column) for the complete Bezier curve
lines:
Draws the Bezier curve
show:
Provides a concise display of information
Author(s)
Jeff Gentry
See Also
xyPoint
Examples
V <- letters[1:10]
M <- 1:4
g1 <- randomGraph(V, M, .2)
z <- agopen(g1,"foo")
x <- AgEdge(z) ## list of AgEdge objects
x[[1]] ## AgEdge
a <- splines(x[[1]])[[1]]
a ## BezierCurve
cPoints(a)
pointList(a)
bezierPoints(a)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(Rgraphviz)
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Loading required package: grid
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/Rgraphviz/BezierCurve-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: BezierCurve-class
> ### Title: Class "BezierCurve": A class to describe a Bezier curve
> ### Aliases: BezierCurve-class BezierCurve cPoints pointList bezierPoints
> ### bLines show,BezierCurve-method lines,BezierCurve-method
> ### bLines,BezierCurve-method bezierPoints,BezierCurve-method
> ### pointList,BezierCurve-method cPoints,BezierCurve-method
> ### Keywords: classes
>
> ### ** Examples
>
> V <- letters[1:10]
> M <- 1:4
> g1 <- randomGraph(V, M, .2)
> z <- agopen(g1,"foo")
> x <- AgEdge(z) ## list of AgEdge objects
> x[[1]] ## AgEdge
Error in x[[1]] : subscript out of bounds
Execution halted