polycirc2 {pgirmess}R Documentation

Computes the polygon coordinates of a circle sector

Description

Computes the polygon coordinates of a circle sector

Usage

polycirc2(radius = 1, center = c(0, 0), edges = 50, init = pi/2, angle = pi/2)

Arguments

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

Details

The matrix of coordinates obtained is intended to be passed to the function polygon

Value

A matrix of coordinates

See Also

polygon,polycirc, floating.pie

Examples

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)

[Package pgirmess version 1.3.8 Index]