function shift1(t) {
const d1 = Math.sqrt((t[0][0] - t[1][0])**2 + (t[0][1] - t[1][1])**2)
const d2 = Math.sqrt((t[0][0] - t[2][0])**2 + (t[0][1] - t[2][1])**2)
const d3 = Math.sqrt((t[1][0] - t[2][0])**2 + (t[1][1] - t[2][1])**2)
if ((d3 >= d2) && (d3 >= d1)) {
return t
} else if ((d2 >= d3) && (d2 >= d1)) {
return [t[2], t[1], t[0]]
} else {
return [t[2], t[1], t[0]]
}
}