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].Simple diagram. The angle s is easy to calculate from H and Z, so we just take that angle and assume it's from the horizon, so convert it to a tangent fraction
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:Seems like you are calculating the screen pixels of the sagitta dip when the camera is centered on the horizon?
Which is incorrect to my understanding.aka (the fraction of the width of the screen the sagitta would cover if turned horizontal) * (the width of the screen in pixels)
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:
16.2 KB Views: 142