1.0.2 • Published 8 years ago
primitive-circle v1.0.2

primitive-circle
Creates circle geometry
Usage
var createCircle = require('primitive-circle')
var circle = createCircle(1, 32)
//circle = { positions: [[x,y], ...], cells: [[0, 1], [1,2], ...] }API
createCircle(r, segments)
r- radius of the circlesegments- number of segments the circle will be made of
Returns geometry object with positions x, y and cells i, j
Note: Points will be ordered clock-wise starting at 3pm
License
MIT, see LICENSE.md for details.