Generates points spaced out on the given number of rings.
Get points as array
const circle = { radius: 5, x: 100, y: 100 };const opts = { rings: 5 };const points = [...circleRings(circle, rings)]; Copy
const circle = { radius: 5, x: 100, y: 100 };const opts = { rings: 5 };const points = [...circleRings(circle, rings)];
Or iterate over them
for (const point of circleRings(circle, opts)) {} Copy
for (const point of circleRings(circle, opts)) {}
Source: http://www.holoborodko.com/pavel/2015/07/23/generating-equidistant-points-on-unit-disk/#more-3453
Optional
Generates points spaced out on the given number of rings.
Get points as array
Or iterate over them
Source: http://www.holoborodko.com/pavel/2015/07/23/generating-equidistant-points-on-unit-disk/#more-3453