fix: implement simple distortion fix

This commit is contained in:
2021-03-10 14:24:50 +01:00
parent 578ee0d3fa
commit 3a69f43f23
3 changed files with 9 additions and 9 deletions

View File

@ -28,7 +28,9 @@ self.addEventListener('message', function (e) {
const y = Math.floor(i / width);
// KarlKilian Formel
const pixelValue = Math.cos(360 / (Math.pow(height, 2)) * Math.pow(y, 2) + (-360 / height) * y + 90);
//const pixelValue = Math.cos(360 / (Math.pow(height, 2)) * Math.pow(y, 2) + (-360 / height) * y + 90);
const pixelValue = (2 * Math.sqrt(y * (height - y))) / height;
oldStore[id] = oldStore[id] + 1 || 1;