map a square to a circle code example
Example: map a square to a circle
function map(x, y) {
return [
x * Math.sqrt(1 - y * y / 2),
y * Math.sqrt(1 - x * x / 2)];
}
function map(x, y) {
return [
x * Math.sqrt(1 - y * y / 2),
y * Math.sqrt(1 - x * x / 2)];
}