Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Commit

Permalink
fix winkel tripel artifacts (just a hack)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunlebron committed Mar 15, 2015
1 parent 5aa3897 commit 33e539c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions game/lua-scripts/lenses/winkeltripel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 33e539c

Please sign in to comment.