# Are Lynch's Horizon Calculations correct?

Discussion in 'Flat Earth' started by DarkStar, Aug 27, 2016.

1. ### DarkStarActive Member

I'm not sure we're in sync based on your drawing. Everything is rotated about the x-axis by exactly the 'Horizon Dip' angle (you seem to be showing the Horizon Sagitta angle) to make the Horizon peak go from [0,H,Z] to [0,0,D].

As shown because H*cos(atan(H/Z) - Z*sin(atan(H/Z)) = 0 (always, doesn't matter what H & Z are) and
H*sin(atan(H/Z)) + Z*cos(atan(H/Z)) = D giving our definitions of H & Z in terms of h & R.

So this would be a counter-clockwise rotation of the world about the camera (or tilting the camera down so the horizon peak is dead center of our view) in the below diagram. The purple line would become straight across.

Question is, should a rotation around [0,0,0] change the final result in terms of #pixels of the Sagitta? it seems to, just a bit

Where you said:

This is a correct statement as best I can understand. But then said:

Which is incorrect to my understanding.

I'm simply pointing the camera down a few degrees (atan(H/Z) to be exact) to put the horizon peak dead center in the camera. So I'm *NOT* talking about the orange line here (Horizon Sagitta Angle θ) but rather the angle 90°-β, where β = asin(R/(h+R))

That's the part that is confusing me as you seem to be using by θ in your diagram (a smaller angle).

I've marked up your diagram here to hopefully explain better:

#### Attached Files:

• ###### Horizon3DCoordinates.png
File size:
16.2 KB
Views:
0

Last edited: Sep 5, 2016
• Like x 3
3. ### DarkStarActive Member

Nice but maybe should use the rotated equation? - it's only fractionally different but it's a lot easier to put the horizon on the center mark than it is to put the unmarked spot that is 'dead ahead' in the center (and you get less lens distortion in the middle)?

I found an error in my previous post and have corrected it here - this enabled the equation to be greatly simplified.

Here is the math again for review:

B = [Z*sin(a/2), H, Z*cos(a/2)]

And we rotate, for our small angles the cos(u) term will the majority of the value, and we shift a tiny bit into sin(u). So this means y' is almost the same as H, and z' is almost the same as z:

x' = Z*sin(a/2)
y' = H*cos(u) - (Z*cos(a/2))*sin(u)
z' = H*sin(u) + (Z*cos(a/2))*cos(u)

B' = [Z*sin(a/2), H*cos(u)-(Z*cos(a/2))*sin(u), H*sin(u)+(Z*(cos(a/2))*cos(u)]

and project into 2D by dividing x and y by z:

B" = [(Z*sin(a/2))/(H*sin(u)+(Z*(cos(a/2))*cos(u)), (H*cos(u)-(Z*cos(a/2))*sin(u))/(H*sin(u)+(Z*(cos(a/2))*cos(u))]

This is why you need special video cards to play games at high framerates...

Our Δy is therefore just B" y value:

H*cos(u) - (Z*cos(a/2))*sin(u)
Δy = -------------------------------
H*sin(u) + (Z*cos(a/2))*cos(u)

Divide Δy by 2 times B's rotated x-extent (x/z now) to get our ratio (I multiply by the inverse here):

H*cos(u) - (Z*cos(a/2))*sin(u) H*sin(u)+(Z*(cos(a/2))*cos(u)
------------------------------ * -----------------------------
H*sin(u) + (Z*cos(a/2))*cos(u) 2*Z*sin(a/2)

The first denominator and the second numerator cancel out leaving:

H*cos(u) - (Z*cos(a/2))*sin(u)
------------------------------
2*Z*sin(a/2)

and multiply by our horizontal pixel count to scale back to pixels, giving our formula:

H*cos(u)-(Z*cos(a/2))*sin(u)
Sagitta Pixel Height = p * ----------------------------
2*Z*sin(a/2)

Forum doesn't seem to like the leading white-space so:

Sagitta Pixel Height = p * (H*cos(u)-(Z*cos(a/2))*sin(u))/(2*Z*sin(a/2))

and u = arctan(D/R) = arctan(H/Z)

Desmos: https://www.desmos.com/calculator/utdk0p4v4b

My focus now is trying to get a Lynch equation to give a proper curve. Any help is greatly appreciated

Last edited: Sep 6, 2016

6. ### DarkStarActive Member

This bit is concerning me now as with Lynch we're supposed to get the angular size at some FOV -- but it doesn't seem to be giving us that.

If I plot this angle (which matches the geometry angles) then I get a much steeper curve than Lynch's

"Vertical angle below the true horizon (degrees)".

We've been plotting your "ratio" times the FOV which are these dashed lines. But using atan(2*f(h,a)*tan(a/2)) I get the solid black lines. While Lynch's lines are even more shallow than the dashed lines.

Thoughts?

7. ### DarkStarActive Member

I think I found another issue with our model Mick

We're applying FOV as if we're in the center of the horizon circle (distance Z) rather than from observer (distance D).

In practice it's only a small error as Z and D are pretty close but would increase with height.

But not sure yet how to find the intersection of the FOV and the horizon circle. What do you think? Does it matter?

I'm assuming the camera is looking along the level line, so FOV is a segment of the horizon circle.

9. ### TrailblazerModeratorStaff Member

I had somehow missed this thread and just wanted to say it's very useful. Hardly any discussion of horizon curvature seems to discuss WHY the horizon does or doesn't look curved, or make it clear that the visual curvature of the horizon is really a quite separate issue from the curvature of the Earth itself (in fact if you know the size of the horizon circle and the height of the observer above it then you can totally ignore the Earth's curvature, as far as I can see!)

10. ### DarkStarActive Member

Yes, I don't think the fact that it's a slice of a spheroid matters much in practice because it's a very thin slice (all things considered) and you can't see past that tangent line -- it matters as to what you see where, but not as to how the horizon line itself appears.

For me the big realization from this exercise was that at 35k' or 100k' a huge chunk of what you actually can make out visually isn't anywhere even near the horizon edge -- you get 100's of miles bunched up in a fraction of a degree along the horizon. So your effective horizon is much smaller than the actual horizon.

In fact, I think even FE agree that the horizon is a circle (they just appeal to magical perspective and 'vanishing points') so it really wouldn't be "Flat" even in THEIR model. They just like to make random assertions that don't fit together in a cohesive model.

I just want to be able to calculate what the edge of such a circle *should* look like

Welcome to the fun -- there are still unanswered questions here if you think you can help out please jump in.

#1 issue - should we be using atan(2*f(h,a)*tan(a/2)) to get the true angular size? Is that different than what Lynch plotted and why? My current calculations are here on Desmos

#2 issue - how do I intersect my FOV lines with my tilted circle? [I agree with Mick that in the simpler case since it's perfectly rectilinear it should be ok to use Z*cos/Z*sin but when I tilt 'down' (aka rotate everything up) I'm pretty certain I can see proportionally more curve [based on a physical experiment I did]

#3 issue - how can we reproduce the Lynch curves?

11. ### TrailblazerModeratorStaff Member

I need to study the diagrams etc properly to get a grip on the terminology when I have the time.

Quick question, though, have you extended your examples way out into space to see how the calculations hold up? As you shift your viewpoint higher and higher above the globe in, for example, Google Earth, there's a kind of shift in perception where you go from looking at a slightly curved horizon to looking at the outline of a planet. Nothing is really changing, it's just a perception issue once the curve becomes noticeable enough and the FOV becomes wide enough.

For example when you are at a given height h such that the distance to the horizon is equal to the radius of the Earth r, then a 90-degree field of view will exactly span the entire horizon. (This occurs when h = (sqrt2 - 1) r, in other words h = 1639.87 miles approximately.)

So the "horizon dip angle" is 45 degrees. What does the "tilt angle", of exactly 1 radian, refer to here?

In some of the calculations there's an assumption that the "distance" is the straight line distance, and in others it's the arc distance. If you click on "advanced" the working is show for tilt and dip:
https://www.metabunk.org/curve/?d=3959&h=8658521&r=3959&u=i&a=a&fd=60&fp=3264

• Informative x 1

And the Horizon Curve calculations are only show under "advanced"
My assumption with the "fraction" and "pixel" calculations is that you are looking level, not at the horizon.

14. ### TrailblazerModeratorStaff Member

That makes sense. And was wrong when I said that a 90-degree FOV at this height would let you see the full horizon. A 90-degree FOV would only show a quarter of the circle.

To get "horizon curve fraction = 0.5", you need a 180 degree FOV at that height.

(To get the horizon curve to equal 0.5 in a 90-degree FOV you would need a height of about 6386 miles, by trial and error, but I haven't figured out how to derive that yet!)

If you look straight down towards the center of the earth with a 90 degree FOV, you get a full width view of the Earth at 3959*(sqrt(2)-1) miles up. 1640 miles, and this can be verified in google Earth:

If we tilt this view up 45 degrees, things look a little odd

• Informative x 1
16. ### TrailblazerModeratorStaff Member

I don't have Google Earth installed on this machine. If you keep the tilt at 45 degrees, does the horizon exactly fit the frame with a 180-degree horizontal FOV (and 90-degree vertical FOV)?

GE only goes up to 110°

But why would it fill the frame at 180°? You'd have to be on the ground, looking straight down at the ground.

18. ### TrailblazerModeratorStaff Member

Well yes you'd think so. I was trying to work out the behaviour in Google Earth, where the horizon seems to get wider when you tilt the camera up. It doesn't seem to behave like it should. And your curve calculation gives a value of 0.5 with a 180-degree field of view. A "horizon curve fraction" of 0.5 is equal to half a circle, isn't it?

No, it's equal to half the field of view.

My curve fraction equation is just the rectilinear projection of the point of intersection of the FOV with the horizon. The equation does not really make sense for something like 180° FOV.

And if you think about it, a 180° FOV is impossible for rectilinear projection, as the focal length approaches zero the distortion of the image asymptotically approaches infinity, pushing everything to the edges of the image.

And for practical purposes, around 110° is a quite reasonable limit for the type of images we are talking about. My interest here is in measuring the horizon curve from photographs taken with a rectilinear lens. The widest consumer RL lens seems to be the Canon 11-24mm at 126° (\$3,000), but the more common wide angle lens is 16mm (10mm on APS-C cameras like my 7D) at 108°

• Agree x 1
21. ### TrailblazerModeratorStaff Member

Yes I was right first time with the 90 degree FOV at that height. I don't see why the Earth appears to take up a wider angle when the camera is tilted up though.

It's rectilinear distortion. It's somewhat easier to picture what is going on if you imagine the globe being inside a cube (or the horizon circle being inside a square).

Last edited: Sep 10, 2016
23. ### DarkStarActive Member

I was finally able to turn doctorbuttons equations into a graph. Looks like they land on the OTHER side of lynch however - he is reviewing them to see if mine matches his.

https://www.desmos.com/calculator/sxau896szv

H, Z, D - remain unchanged

x=FOV/2
X=2*D*sqrt((sin^2(x/2)*(R^2-D^2*sin^2(x/2)))/R^2)
S=R-sqrt(R^2 - X^2)
Lynch = arctan(S/D)

Note that X is derived from this equation: 2*arcsin(sqrt(X^2 + S^2)/(2*D))

Which would convert this odd 'off angle' to FOV/2 - I substituted and solved for the FOV/2 angle to get the new X equation above.

We continue to review.

24. ### DarkStarActive Member

So we confirmed those previous equations do not match Lynch's curves, so that's a bust.

I think the true/geometric angle is the best information we have and it's pretty far from Lynch (compared to some of the other curves, but it's not so far off).

Given:
h = height
a = FOV

We have:
ß = arcsin(R/(h+R))
D = sqrt(h*(h+2*R))
Z = (D*R)/(h+R)
S = (h*R)/(h+R)
H = S+h

u = 90°-ß = arctan(H/Z) = arctan(D/R)
v = arctan(H/(Z*cos(a/2))) = arctan(D/(R*cos(a/2))

True geometric angle = v-u

That doesn't get you to pixels mind you - this is just the angle at O between K & P on my diagram.

Substitute & simplify:

arctan(H/(Z*cos(a/2)))
arctan(((h*R)/(h+R)+h)/(Z*cos(a/2)))
arctan(((h*R)/(h+R)+h)/(((sqrt(h(h+2*R))*R)/(h+R))*cos(a/2)))
arctan(sqrt(h(h+2*R))/(R*cos(a/2)))
arctan(D/(R*cos(a/2)))

arctan(H/Z)
arctan(((h*R)/(h+R)+h)/Z)
arctan(((h*R)/(h+R)+h)/((sqrt(h(h+2*R))*R)/(h+R)))
arctan(sqrt(h(h+2*R))/R)
arctan(D/R)

Which gives us:

True geometric angle = arctan(D/(R*cos(a/2)) - arctan(D/R)
or
True geometric angle = arctan(sqrt(h*(h+2*R))/(R*cos(a/2))) - arctan(sqrt(h*(h+2*R))/R)

That curve is significantly steeper than Lynch's curves but I am 99% certain that it is the correct geometric angle - I don't know if that is what Lynch intended for sure but I thought it was. These angles match the GeoGebra calculator also.

Desmos calculator

Here are the curves overlayed with Lynch's diagram (Lynch in red again):

You might want to try just emailing Lynch

26. ### DarkStarActive Member

I did a while back - no answer thus far

27. ### Mino ReNew Member

thoughts on my diagram (not as pretty as yours but I submit it for your perusal)

Last edited by a moderator: Jul 21, 2017
28. ### Mino ReNew Member

this is my understanding of what the apparent curvature of the horizon would be from any height, given that a 60 degree field of view. I had uploaded a prior version of this somewhere up here---will be looking for it, if it is still up, in order to take it down. All the supporting equations are correct but the final 'C'= (apparent curvature) was completely wrong. It was correct in my spreadsheet, but I had simply written it wrong. This is the corrected version, both an isometric and a section through it. Some answers it provides are: at 500 feet, c= 0.0578 degrees; at 10,000 feet, c=0.271 deg.; at 100,000 feet, c=0.871 deg; at 50 miles, c=1.436 deg; at 250 miles, c=3.45 deg. The horizon lies in a plane that is H+Ms below the observer. It's only true curvature is R=X in the diagram, so the only curvature you perceive vertically is by way of perspective.

Last edited by a moderator: Aug 31, 2017
• Like x 1
29. ### LaserMember

@Mino Re - Your method of figuring this looks like it may have some simplifications over my method. But how did you come to Theta=60/cos(S)? It looks good for small S but as S approaches 90deg then it looks to me like Theta should approach something like 180deg rather than infinity.

30. ### RorySenior Member

Should X not be curved line also?

Last edited: Sep 3, 2017
31. ### LaserMember

It looks to me like the X lines in Mino Re's diagram are straight because they are just the radiuses of the horizon circle.

By the way, I also tried emailing Lynch at his Caltech email address on Aug 27 to ask for the formula that he used to calculate his figure 7, but he hasn't got back to me. Maybe my email got spam filtered.

I wonder why this thread appears for me as the 14th thread below a horizontal blue bar in the Flat Earth forum even when the threads are sorted by most recent post and this thread has the most recent post? It seems like it should be at top. I missed a lot of the active threads for a while because I didn't think there was anything new way down there. Is this an issue just for me or is this a known bug?

32. ### RorySenior Member

You mean it's appearing as 14th of the non-pinned posts?

33. ### LaserMember

Oh, the ones above are pinned. I didn't notice the pins. Ok, I guess there is nothing wrong then.

34. ### LaserMember

@Mino Re - I see how we can find θ easily. You have a line labeled with length D that makes a chord across the horizon circle. This chord is split in half at the meeting point of the segments Mx and (X-Mx). Lets label half that chord Mw. You have the field of view as 60deg but I want to keep this formula general for different fields of view so I'm just going to call the field of view Fov. So:
D*sin(Fov/2) = Mw
and
X*sin(θ/2) = Mw
therefore substituting out Mw gives:
X*sin(θ/2) = D*sin(Fov/2)
and solving for θ:
θ = 2 arcsin(sin(Fov/2)*D/X)
I'm going to study the calculations of Mick West and DarkStar upthread before I finish this.

Note these are encoded in the advanced version of the calculator, so you can compare actual numbers easily.

https://www.metabunk.org/curve/?d=4&h=6&r=3959&u=i&a=a&fd=60&fp=3264
In the page code as:
Code:
```		// For horizon curve, via:
// https://www.metabunk.org/are-lynchs-horizon-calculations-correct.t7877/#post-189546
// Intermediate forms
// Z=(R*sqrt((R+h)^2-R^2))/(R+h))
// H=(((R+h)^2-R^2)/(R+h))
// ratio = SQRT(h*(h+2*R))/R*tan(a/4)/2
// angle = (atan(Z/H)-atan(Z*cos(a/2)/H))

var dropPixels = dropFraction*fovPixels;
var Z = (r*Math.sqrt((r+h)*(r+h)-r*r))/(r+h);
var H = (((r+h)*(r+h)-r*r)/(r+h));

// Second method via: https://www.metabunk.org/are-lynchs-horizon-calculations-correct.t7877/#post-189661
```

36. ### LaserMember

@Mino Re - A couple more things I forgot. Can't we just calculate S as 90-R rather than that complicated arctan of a radical formula? And one of your diagrams has R as 3969mi. But the sources I've looked at make that look too big as an average earth radius even if you include the land, and I'm assuming we're using sea level for our R. Regardless of the precisely correct value, it would probably be best for us all to use the same R of 3959mi just to make it easier to compare the results of our various calculations. While I would normally use metric for my calculations, I use miles for flat earth calcs because it has been said that most flat earthers are American and I want to keep it as familiar to them as I can.

@Mick West - Thanks for putting the relevant code snippet right in front of me. Hopefully I can get to it tomorrow. Another thing you might consider adding to your calculator is a way for a photographer to determine the field of view of their camera. For example you could have the user take a picture of a tape measure and enter the distance to the tape and the tape readings on the left and right side of the picture.

There's actually a slight problem with that method - the field of view changes quite significantly with focus! I was doing the test indoors until I found out I needed at least 30m from camera to tape to make it accurate.

38. ### LaserMember

@Mick West - Very interesting. I didn't realize the focus would have nearly that large an impact on the field of view. If we're lucky maybe lenses at a wide angle will have less FOV sensitivity to focus, since horizon curvature shots are necessarily taken at wide angles. Another problem with FOV determination is the measurement of how far the tape is from the lens, since the relevant point of the lens is not usually the front or back surface, but rather some other unknown point. Between these two issues, it is clear that focusing at infinity and putting the tape as far away as practical are methods to be encouraged when finding FOV.

I've looked at your post #10 upthread instead of your code in post #75 because it appeared to be the post where you explain your calculations. The equations in post #10 appear correct on close inspection. Your tactic seems to be the opposite of Mino Re's. You direct the center of the observers field of view to be level, which is above the horizon. Mino Re's method effectively directs the center of the observer's field of view down to the chord line. I think both methods will give virtually identical results for small observer altitudes. And usefully they will probably bracket the value one would get by directing the observer's view at the horizon in the center. That's probably all we need for the practical applications at the low altitudes we have access to. And any error is probably much less than variability of refraction, horizon haze, and maybe even FOV measurement errors.

Still, I'm tempted to go all the way and do a precise calculation for when the observer's view is directed at the horizon. If, for example, the observer is a few thousand miles up, they probably won't even know where the level line above the horizon is, and I think they will calculate significantly different horizon droop values for each of the possibilities of directing the camera at the level line, the horizon, or the chord line, due to variations in where the edges of the FOV intersect the horizon circle. It seems like someone ought to do the exact calculation at least once. It looks like maybe DarkStar already has, so I'm going to check his out next.

Given this was a year ago, I've pretty much forgotten all the details. However I was always trying to think in terms of pixels, rather than angles. So basically I would try to do the math as if I were simulating a camera.

So looking "level" is a slight simplification, as it means the view vector is simply (0,0,z) (i.e. looking along the z-axis). Where the camera is actually pointing will make a difference to pixel measurements. But as you say, identical for low altitude (if looking roughly at the horizon).

40. ### LaserMember

I finally found and verified the exactly correct horizon curve droop calculation for a rectilinear lens image, or theodolite, of a spherical earth horizon without refraction. It's given on the talk page for the Wikipedia "Horizon" article

It is:

y = ( k / ( k^2 - 1 ) ) ( 1 - sqrt( 1 - x^2 ( k^2 - 1 ) ) )

where y is the distance DOWN from the x axis, on an image plane with the origin of the image plane on the central line of sight from the observer to the horizon, and the plane being perpendicular to that line of sight, and where that image plane is one unit in front of the observer. To be clear, the y axis is positive downward

x is the distance on the image plane, from the central line of sight, positive off to the right, to the point where the horizon curve droop will be calculated.

k is the line of sight distance to the horizon divided by the radius of the earth i.e. D/R using the labels we've been using above, or small cursive L divided by R in the symbols used by NoahhaoN on the Wikipedia page.

This appears to have first been figured out by a German astronomer, known on Wikipedia as SiriusB, and posted back on the 7th of October 2006. However, SiriusB didn't show this equation, but instead showed only the curvature of the horizon at the one point along the line of sight in the center of the observer's field of view. Wikipedia editor NoahhaoN then verified and showed in talk how SiriusB might have done his curvature calculation. I've carefully checked NoahhaoN's work, down to the equation I show above, and it looks correct. I did not check anything after the equation I show above, because I wasn't interested in the curvature at only the center of the field of view.

NoahhaoN's derivation either leaves out a couple steps, or somehow I just didn't follow it, so I filled in a few steps with my own that were then consistent with the rest of NoahhaoN's equations. A quick summary of the missing parts is this:

NoahhaoN gives the equation for the sphere centered on the observer with radius l (small L), that contains the horizon circle:

l^2 = X^2 + Y^2 + Z^2

Then I used the formula for a sphere with a center off the origin, to make an equation for the sphere of the earth surface:

X^2 + (Y-R)^2 + (Z-l)^2 = R^2 (again that's a lower case L subtracted from Z, not a one)

Multiplying out the earth sphere equation, and then replacing (X^2 + Y^2 + Z^2) with l^2 in the expanded earth sphere equation, gives an equation for the plane that contains the intersection of the two spheres at the horizon circle:
l^2 - RY - lZ = 0

One particularly good thing about finding the horizon curvature this way, i.e. using the central line of sight being tangent to the horizon, rather than to the observer's level plane or to the secant line connecting two points on the horizon circle, is that it can be used, not only to find the curve on a rectilinear image plane, but also to find the angle of horizon droop as would be measured by a theodolite. When you use a theodolite normally, i.e. with the vertical axis vertical, the crosshairs will trace out the horizon circle all around with a constant dip angle, giving the impression that there is no horizon curvature. But if you think about it, if the crosshairs are more than 90 degrees down from the zenith, then they will actually trace out a cone shaped curve around the observer, which will match the horizon curve. This is more obvious if you draw a circle on a flat floor, centered around a theodolite, with a radius equal to the height of the theodolite above the circle. As you turn the theodolite around, it will show the circle with a large constant dip angle of 45deg below horizonal, but the circle on the floor will be obviously curved when viewed or photographed from the elevated position of the theodolite.

The way to measure and make the curvature obvious with a theodolite, is to set it up normally with the vertical axis vertical, lock the crosshairs at 90 degress down from the vertical, then tilt the vertical axis forward by the amount of the horizon dip, so that the 90deg locked crosshairs point to the horizon. Now if you swing the scope to either side, the true drop of the horizon below the 90deg locked crosshairs will be plainly visible (or measurable of course, if you unlock.

The curvature equation given at the top of this post is for a projection onto an image plane. To calculate expected droop angles for the theodolite requires a few more steps beyond those given by NoahhaoN. For a theodolite, we want the droop angle for a given angle to either side of the central line of sight. For a given angle FOV/2 to a point on the x axis of the image plane, tan(FOV/2)=x/z. Or since the image plane is one z unit from the observer, just tan(FOV/2)=x. Plugging this x value into the first equation of this post, gives a y value. The distance from the observer to the x point is sqrt(x^2 + z^2) and z is 1. So finally the horizon curve droop angle down is atan( y / sqrt( (tan(FOV/2))^2 + 1^2 ) ).

I think this calculation will be correct and intuitive for any altitude. However, the FOV must of course be narrower than the horizon circle or the droop angle would be undefined. I think these formulas would be pretty accurate with refraction if one simply used a larger earth radius.