svg`<svg width="${w}" height="${h}">
<rect x="0" y="0" width="${w}" height="${h}" stroke="red" fill="${colorScale(0)}"></rect>
<g transform="translate(${marginX}, ${marginY})">
${(() => {
return array(ny).map(i => {
const y = i * step
return array(nx).map(j => {
const x = j * step
const noise = simplex.noise3D(x/noiseScale, y/noiseScale, seed)
return `<polyline
opacity="0.6"
transform="translate(${x}, ${y}) rotate(${noise * 360})"
stroke="${colorScale(noise * .45 + .5)}"
stroke-width="${4 - 3 * noise}"
stroke-linecap="square"
points="${-strokeLength / 2},${0} ${strokeLength / 2},${0}"
/>`
}).join('\n')
}).join('\n')
})()}
</g>
</svg>`