alphahull (version 2.2)

arc: Add an arc to a plot

Description

This function adds the arc of \(B(c,r)\) between the angles that \(A_\theta v\) and \(A_{-\theta} v\) form with the axis OX, where \(A_\theta v\) represents the clockwise rotation of angle \(\theta\) of the vector \(v\).

Usage

arc(c, r, v, theta, ...)

Arguments

c

Center \(c\) of the arc.

r

Radius \(r\) of the arc.

v

Vector \(v\) in the plane.

theta

Angle \(\theta\) (in radians).

Arguments to be passed to methods, such as graphical parameters (see par).

See Also

plot.ahull.

Examples

Run this code
# NOT RUN {
# Plot of the circumference of radius 1
theta <- seq(0, 2*pi, length = 100)
r <- 1
plot(r*cos(theta), r*sin(theta), type = "l")
# Add in red the arc between pi/4 and 3*pi/4
arc(c(0,0), 1, c(0,1), pi/4, col = 2, lwd = 2)
# }

Run the code above in your browser using DataLab