function circleFrom3Points([x_1, y_1], [x_2, y_2], [x_3, y_3]) {
let M_11 = det3([
x_1, y_1, 1,
x_2, y_2, 1,
x_3, y_3, 1,
]);
let M_12 = det3([
x_1*x_1 + y_1*y_1, y_1, 1,
x_2*x_2 + y_2*y_2, y_2, 1,
x_3*x_3 + y_3*y_3, y_3, 1,
]);
let M_13 = det3([
x_1*x_1 + y_1*y_1, x_1, 1,
x_2*x_2 + y_2*y_2, x_2, 1,
x_3*x_3 + y_3*y_3, x_3, 1,
]);
let M_14 = det3([
x_1*x_1 + y_1*y_1, x_1, y_1,
x_2*x_2 + y_2*y_2, x_2, y_2,
x_3*x_3 + y_3*y_3, x_3, y_3,
]);
const x_0 = ((1 / 2) * M_12) / M_11;
const y_0 = ((-1 / 2) * M_13) / M_11;
const r = Math.sqrt(x_0 * x_0 + y_0 * y_0 + M_14 / M_11);
return [x_0, y_0, r];
}