data = {
const points = [
{id: 1, x: 12, y: 17, weight: 0.12},
{id: 2, x: 24, y: 63, weight: 0.53},
{id: 3, x: 39, y: 82, weight: 0.91},
{id: 4, x: 40, y: 10, weight: 0.22},
{id: 5, x: 52, y: 33, weight: 0.58},
{id: 6, x: 61, y: 68, weight: 0.36},
{id: 7, x: 68, y: 31, weight: 0.71},
{id: 8, x: 72, y: 82, weight: 0.32},
{id: 9, x: 85, y: 23, weight: 0.5},
{id: 10, x: 90, y: 12, weight: 0.19},
{id: 11, x: 92, y: 89, weight: 0.08},
{id: 12, x: 95, y: 45, weight: 0.98}
]
const boundary = []
let n = 13
const grid = [0, 2, 4, 6, 8, 10]
grid.forEach(i => {
grid.forEach(j => {
if ((i === 0 || i === 10) || (j === 0 || j === 10)) {
boundary.push({id: n, x: i * 10, y: j * 10, weight: 0})
n++
}
})
})
return points.concat(boundary)
}