svgPolygons = polygons.map((p, i) => {
function interpolate(angle, start, range) {
let a = angle / 180 * Math.PI
let t = (Math.cos(a) * x + Math.sin(a) * y) / 1000
return start + t * range
}
let [x, y] = p[0]
let hue = interpolate(hueAngle, hueStart, hueRange)
let sat = interpolate(satAngle, satStart, satRange)
let val = interpolate(valAngle, valStart, valRange)
let color = `hsl(${hue|0}, ${sat|0}%, ${val|0}%)`
return svg`<polygon fill="${color}" stroke="${color}" stroke-width="0.5" points="${p.join(' ')}">`;
})