From 33e539c5b3dca6e3599210763f0b92caa686b37e Mon Sep 17 00:00:00 2001 From: Shaun Williams Date: Sun, 15 Mar 2015 16:05:15 -0500 Subject: [PATCH] fix winkel tripel artifacts (just a hack) --- game/lua-scripts/lenses/winkeltripel.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/game/lua-scripts/lenses/winkeltripel.lua b/game/lua-scripts/lenses/winkeltripel.lua index 82f4954..7a94c39 100644 --- a/game/lua-scripts/lenses/winkeltripel.lua +++ b/game/lua-scripts/lenses/winkeltripel.lua @@ -27,6 +27,9 @@ function lens_inverse(x,y) if abs(y) >= lens_height/2 then return nil end + if is_inside_artifact_box(x,y) then + return nil + end local lambda = x local phi = y @@ -82,3 +85,12 @@ lens_height = 2*y x,y = lens_forward(latlon_to_ray(0,pi)) lens_width = 2*x + + +-- there are some bad artifacts in the corners of the image +-- (just remove them here manually) +artifact_x = lens_width/2*0.71 +artifact_y = lens_height/2*0.81 +function is_inside_artifact_box(x,y) + return abs(x) > artifact_x and abs(y) > artifact_y +end