paths = {
const paths = []
const numPoints = numPetals * numPointsPerPetal
const size = 100
const TAU = Math.PI * 2
const pointOf = n => ([size * Math.tan((n / numPoints+rotation) * TAU), size * Math.tan((n / numPoints+rotation + 0.25) * TAU)])
for (let rotate = 0; rotate < numPoints/2; rotate += numPointsPerPetal) {
for (let point = 0; point < numPoints; point++) {
const fromPoint = rotate + point
const toPoint = rotate + point * offset + 1
paths.push([pointOf(fromPoint), pointOf(toPoint)])
}
}
return paths
}