powered by
Computes the polygon coordinates of a circle
polycirc(radius, pts = c(0, 0), nbr = 50)
A matrix of coordinates.
the length of the radius.
the coordinates of the center.
the number of segments required to draw the perimeter
The matrix of coordinates can then be used with the function polygon
polygon,findR
polygon
findR
plot(1:10,1:10,type="n",asp=1) polygon(polycirc(5),col="blue") polygon(polycirc(2,c(5,5)), col="red")
Run the code above in your browser using DataLab