g = function(x,y,col,t) {
const dStep = [
'',
`M 0 ${y} L ${x} ${y} L ${x} 10`,
`M 0 ${y} L ${x} ${y} L 10 ${x}`,
`M 0 ${y} L ${x} ${x*(x-y)/10 + y} L 10 ${x}`,
`M 0 ${y} L ${x} ${x*(x-y)/10 + y} L 10 ${x}`,
'',
].map((a,i,array) => d3.interpolate(array[i-1],a))
const circStep = [
{cx:x, cy:y, r: .2, fill: col,},
{cx:x, cy:y, r: .2, fill: col,},
{cx:x, cy:y, r: .2, fill: col,},
{cx:x, cy:x*(x-y)/10 + y, r: .2, fill: col,},
{cx:x, cy:x*(x-y)/10 + y, r: 0, fill: col,},
{},
].map(JSON.stringify)
.map((a,i,array) => d3.interpolate(array[i-1],a))
return html`<svg viewport="0 0 10 10">
<g>
<circle ${JSON.parse(circStep[Math.floor(t)](t - Math.floor(t)))}/>
<path
d=${dStep[Math.floor(t)](t - Math.floor(t))}
fill="none"
stroke-width="0.15"
stroke-linejoin="round"
stroke="${col}"
/>
</g></svg>`
}