polycirc2 | R Documentation |
Computes the polygon coordinates of a circle sector
polycirc2(radius = 1, center = c(0, 0), edges = 50, init = pi/2, angle = pi/2)
radius |
the circle radius |
center |
the centre coordinates (defaut to x=0, y=0) |
edges |
the circular outline of the sector is approximated by a polygon with this many edges |
init |
number (in radian) specifying the starting angle |
angle |
number (in radian) specifying the sector angle |
The matrix of coordinates obtained is intended to be passed to the function polygon
A matrix of coordinates
polygon
,polycirc
, floating.pie
plot(c(-1,+1),c(-1,+1),type="n",asp=1)
polygon(polycirc2(),col="red")
polygon(polycirc2(init=pi,angle=pi/4),col="green")
polygon(polycirc2(init=1.5*pi,angle=pi/4),col="violet")
polygon(polycirc2(radius=0.5,center=c(0.5,1)),col="blue")
polycirc2(init=pi,angle=pi/4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.