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)

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.