function nicolosiInverse(x, y) {
const x2 = x * x;
const y2 = y * y;
const x2y2 = x2 + y2;
const pi = Math.PI;
const pi2 = pi * pi;
const { sin, cos } = Math;
const fn1 = function(phi) {
return x2y2 * (pi * sin(phi) - 2 * phi) * pi + 4 * phi * phi * (y - sin(phi)) + 2 * pi * phi - pi2 * y;
}
const fn2 = function(phi) {
return x2y2 * (pi * cos(phi) - 2) * pi + 8 * phi * (y - sin(phi)) - 4 * phi * phi * cos(phi) + 2 * pi;
}
return [
solveLambda(x, 1 - x2 - y2, -x) * Math.PI / 2 || 0,
solvePhi(fn1, fn2)
];
}