EllipticalArc | R Documentation |
An arc is given by an ellipse (Ellipse
object),
a starting angle and an ending angle. They are respectively named
ell
, alpha1
and alpha2
.
ell
get or set the ellipse
alpha1
get or set the starting angle
alpha2
get or set the ending angle
degrees
get or set the degrees
field
new()
Create a new EllipticalArc
object.
EllipticalArc$new(ell, alpha1, alpha2, degrees = TRUE)
ell
the ellipse
alpha1
the starting angle
alpha2
the ending angle
degrees
logical, whether alpha1
and alpha2
are
given in degrees
A new EllipticalArc
object.
ell <- Ellipse$new(c(-4,0), 4, 2.5, 140) EllipticalArc$new(ell, 45, 90)
print()
Show instance of an EllipticalArc
object.
EllipticalArc$print(...)
...
ignored
startingPoint()
Starting point of the reference elliptical arc.
EllipticalArc$startingPoint()
endingPoint()
Ending point of the reference elliptical arc.
EllipticalArc$endingPoint()
isEqual()
Check whether the reference elliptical arc equals another elliptical arc.
EllipticalArc$isEqual(arc)
arc
an EllipticalArc
object
complementaryArc()
Complementary elliptical arc of the reference elliptical arc.
EllipticalArc$complementaryArc()
ell <- Ellipse$new(c(-4,0), 4, 2.5, 140) arc <- EllipticalArc$new(ell, 30, 60) plot(NULL, type = "n", asp = 1, xlim = c(-8,0), ylim = c(-3.2,3.2), xlab = NA, ylab = NA) draw(arc, lwd = 3, col = "red") draw(arc$complementaryArc(), lwd = 3, col = "green")
path()
The reference elliptical arc as a path.
EllipticalArc$path(npoints = 100L)
npoints
number of points of the path
A matrix with two columns x
and y
of length
npoints
.
length()
The length of the elliptical arc.
EllipticalArc$length()
A number, the arc length.
clone()
The objects of this class are cloneable with this method.
EllipticalArc$clone(deep = FALSE)
deep
Whether to make a deep clone.
## ------------------------------------------------
## Method `EllipticalArc$new`
## ------------------------------------------------
ell <- Ellipse$new(c(-4,0), 4, 2.5, 140)
EllipticalArc$new(ell, 45, 90)
## ------------------------------------------------
## Method `EllipticalArc$complementaryArc`
## ------------------------------------------------
ell <- Ellipse$new(c(-4,0), 4, 2.5, 140)
arc <- EllipticalArc$new(ell, 30, 60)
plot(NULL, type = "n", asp = 1, xlim = c(-8,0), ylim = c(-3.2,3.2),
xlab = NA, ylab = NA)
draw(arc, lwd = 3, col = "red")
draw(arc$complementaryArc(), lwd = 3, col = "green")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.