1. Mick West

    Mick West Administrator Staff Member

    Interesting things happen when you put refraction into the flat earth model. Here's standard refraction from 10 feet.
    Metabunk 2019-01-24 15-34-43.

    Look where the horizon is! The standard atmosphere is denser lower down due to air pressure, so all rays bend down, and over a long distance they hit the water. This raises up the horizon in the image quite a bit.

    It's not at all as dramatic as it looks though, the vertical field of view here is 0.1° (vs. about 0.75 for a P900)
     
  2. Rory

    Rory Senior Member

    Amazing work, Mick! I love stuff like this 'cos it makes me realise my place in the grand scheme of things. ;)

    Coupla questions: do the red and blue lines of the 60 foot target signify anything? Being the same colour as the refraction lines there's a sense that they're related. Also, in the previous comment the non-refracted flat earth target has ten feet below the horizon. Why is that? I guess I've always thought it would always be visible.

    Also, how does the flat earth simulation know where to put a horizon?

    Cheers. :)
     
  3. Mick West

    Mick West Administrator Staff Member

    No, they are just there so you can see reflections more clearly. When the slope of the line changes direction. like here:
    [​IMG]
    At the very bottom there's a small region of reflection, but without the diagonal lines, you would not be able to tell.

    It is visible. It's in front of the horizon

    IMprefectly, but close enough.
    Code:
    var widthToTrace = sideWidthFeet;
    if (par.useFlat) widthToTrace *=3;
    
    // and later
    
    if (par.useFlat && angle >0 || sy(y)>sideHeightPixels)
    	rayHitGround[line] = true;
    
    That last bit is: "If we are simulating a flat earth, and were are looking down then we hit the ground, or if the ray goes below then we hit the ground"

    So without refraction it just puts the horizon at eye level. This is reasonable, except you would not get a sharp horizon due to haze.

    With refraction light rays to are angled up a bit can still hit the ground, so the apparent horizon can move. I triple the distance over which rays are traced in order for this to be more accurate, but it's not perfect.
     
    • Like Like x 1
  4. Mick West

    Mick West Administrator Staff Member

    I've added a couple of laser targets, including "Green Laser at 5 feet" which is a typical FE over-water test configuration. It's ten miles away
    Metabunk 2019-01-25 07-23-11.

    The image above shows the laser visible from 10 feet, but with the relatively small temperature gradient, the laser is visible from 1 foot and even 0.1 feet.

    The other laser target has a different color laser ever five feet, starting at 0 feet and is interesting

    Metabunk 2019-01-26 11-33-06.
     
    Last edited: Jan 26, 2019
  5. Mick West

    Mick West Administrator Staff Member

    [​IMG]

    Some real-world comparisons. Not going to be perfect because of tides, but starting with the image on the right, view from 6 feet, very minor tweak to standard refraction needed to show an extra half a floor.
    Metabunk 2019-01-25 11-42-38.

    Then with the same settings, lower to 2 feet:
    Metabunk 2019-01-25 11-43-45.

    Matches pretty much exactly. Not particularly challenging from a refraction point of view, but still validates the basic model.
     
    • Like Like x 1
  6. Mick West

    Mick West Administrator Staff Member

    If you've not checked this out recently, I've made some substantial improvement in speed, accuracy, configuration options, and the variety of scenes:

    https://www.metabunk.org/refraction/
     
  7. assarzadeh

    assarzadeh New Member

    Last edited by a moderator: Jan 30, 2019
  8. Mick West

    Mick West Administrator Staff Member

    Usually, it's a thermal inversion above both the viewer and the target.

    One of the presets shows a superior mirage of an oil tanker: The temperature curve has a normal lapse rate up to about 150 feet, then a very steep increase of about 2°C, then normal again.

    https://www.metabunk.org/refraction/
    Metabunk 2019-01-30 10-28-44.
     
    Last edited: Jan 30, 2019
  9. Mick West

    Mick West Administrator Staff Member

    Added Pontchartrain, and a general ability for multiple images at different distances. Which might be useful for looking at peaks being obscured by intermediate ridges, like what @Rory was looking at.
    Metabunk 2019-01-30 23-37-34.
     
  10. Mick West

    Mick West Administrator Staff Member

  11. Mick West

    Mick West Administrator Staff Member

    Added a preset to match Walter Bislin's Superior Mirage implementation.

    Walter's
    http://walter.bislins.ch/bloge/index.asp?page=Simulation+of+Atmospheric+Refraction (Click on "Superior Mirage" black button)
    Metabunk 2019-02-06 23-56-26.


    Mine:
    https://www.metabunk.org/refraction/?~(p~'Andy*2fWalter*20Superior)_
    Metabunk 2019-02-06 23-56-50.

    Walter uses a simple spline though three temperature points, whereas I use a Bezier curve with three extra control points. So I had to adjust the control points to match his output. It would be interesting to see if the same temperature curve gives the same results.

    There's a distinct kink at the base of the third and fourth targets which I think might be a bug on my part, to do with the optimization. Needs investigation.
     
    • Like Like x 1
  12. Mick West

    Mick West Administrator Staff Member

    Fixed! It was an error in computing the index gradient below 0.5 feet. Changed

    Code:
    if (x<=0) return nByFoot[0] ;
    
    to

    Code:
    if (x<=0) return nByFoot[0] + (nByFoot[0] - nByFoot[1]) * -x ;
    
    in function calculateInterpolateFunctions()
     
    • Like Like x 1
  13. Mick West

    Mick West Administrator Staff Member

    Done! And I was surprised that it had much more of an effect than I suspected. The Ciddor equation seems to has slightly more effect, but really my previous test wasn't very good, as I did not test it over a range of altitudes.

    The default is still fixed 50%, however there's now an "Edit RH" box that brings up a graph. Here's a fixed 50% RH:
    Metabunk 2019-02-09 08-16-09.

    And 100% at sea level coming down to 30% at 100 feet.
    Metabunk 2019-02-09 08-17-28.

    So now the question is: what's a realistic set of RH profiles?
     
    • Like Like x 1
  14. DavidB66

    DavidB66 Member

    Mathias Kp, who I think is Danish, has made several videos showing the effects of refraction over bodies of water. He has a new one here, with long distance observations of a tall building ('Turning Torso') in Malmo (Sweden) across the straits from Copenhagen over the course of a few hours. There is a striking comparison at around 3:00 in the video, showing an astonishing amount of compression of the bottom of the building:


    Source: https://www.youtube.com/watch?v=SmWyi7rM-NM


    I don't know exactly what kind of refraction is responsible, but Mathias gives some temperature data showing much higher air than water temps.
     
    • Like Like x 1
  15. Mick West

    Mick West Administrator Staff Member

    I added it to the sim
    https://www.metabunk.org/refraction/?~(p~'Turning*20Torso)_
     
  16. Mick West

    Mick West Administrator Staff Member

  17. Mick West

    Mick West Administrator Staff Member

    • Informative Informative x 2
  18. deirdre

    deirdre Moderator Staff Member

    that helps! i bookmarked it as i'll have to rewatch frequently i'm sure.
    so not to interrupt thread too much:

    x.JPG

    the pink area (the area of red and blue lines) is top to bottom of what is showing in the photo.
    the green dot is the top of the rock.
    everything in grey i cannot see in this photo.

    yes?
     
  19. Mick West

    Mick West Administrator Staff Member

    Correct. There are some more blue lines in your image, but they all hit the water before they get as far as the target, so they are the ones that get displayed as water. You can see this more if you raise up the viewer height.
    Metabunk 2019-02-11 17-02-34.
     
  20. deirdre

    deirdre Moderator Staff Member

    so.. the red and blue lines are the top of the photo to the bottom of the rock [that shows in this picture]. ??
     
    Last edited: Feb 11, 2019 at 6:15 PM
  21. Mick West

    Mick West Administrator Staff Member

    If you move your cursor over the side view (the red and blue lines) it will show which line there corresponds to which line in the image.
    Metabunk 2019-02-11 18-25-48.
     
  22. deirdre

    deirdre Moderator Staff Member

    ok playing around with Catalina preset i see there is no exact formula, sometimes the bottom blue line is the bottom of the rock and sometimes its a bit up the rock and sometimes it's in the water. So basically i won't know unless you guys post links to the simulator/photos :)

    I'll have to watch the tutorial a few more times!
     
  23. Rory

    Rory Senior Member

  24. Mick West

    Mick West Administrator Staff Member

    There's a preset in there now:
    https://www.metabunk.org/refraction/?~(p~'Bedford*20Level*3a*20Wallace)_

    Ideal conditions are those that have the least refraction, so really it's going to be when the air temperature is close to the water temperature. But Wallace designed the experiment to minimize the effects of any refraction. Playing around with the simulator it's hard to see how it could go wrong.
     
    • Like Like x 1
    • Agree Agree x 1