grid2 = {
var x = 1
var y = 1
var w = 200
var id = 1
function testPath(x,y) {
var lineGenerator = d3.line();
var pathData = lineGenerator(cShape(x,y))
return pathData+"Z"
}
const s = DOM.svg(500, 500);
s.setAttributeNS(null, 'width', 500);
s.setAttributeNS(null, 'height', 500);
const g = svg`<g />`;
const frame = svg`<rect x="${x}" y="${y}" width="${w}" height="${w}" fill="none"/>`
frame.setAttributeNS(null, "stroke", "#000000");
frame.setAttributeNS(null, "stroke-width", .2);
const clip = svg`<clipPath id="myclip1"><rect x="${x}" y="${y}" width="${w}" height="${w}"/></clipPath>`
clip.setAttributeNS(null, "transform", "rotate("+(-45)+","+(x+w/4)+","+(y+w/2)+")");
const c1 = svg`<path d="${
testPath(x+w,y+w/2)
}" clip-path="url(#myclip1)" style="fill: rgb(100, 0, 0)"></path>`
c1.setAttributeNS(null, "transform", "rotate("+(45)+","+(x+w/4)+","+(y+w/2)+")");
s.appendChild(g);
g.appendChild(clip);
g.appendChild(frame);
g.appendChild(c1);
return s;
}