Skip to main content
GameDev.net gamedev.net
🔒 Locked

horizon

Started by carbon14 Aug 12, 2003 at 10:46 AM 2 replies 750+ views
Original Post
carbon14
carbon14
hi how does one calculate where the horizon line shoud be? from flight simulators, we know that the horizon goes up, if we go down, and it goes down, if we go up. thanks
Cedric
Cedric
Hmm. If you make the approximation that the Earth is flat, then the horizon line is at the same level (apparent height) as your eyes.

Cédric
higherspeed
higherspeed
All you need to know is the radius of the earth, which last year I would have known. Then it''s a case of simple trig to work it out.

I think the angle below the plane with up being a normal, would be given by:

arccos(r/(r+h))

where r is the radius of the earth and h the height of the aircraft.

You would have to go pretty high to see any effect. Also then the horizon would be curved, so drawing it would be harder, but not much of a problem. It''s probably only worth implementing if you get really really high. So unless you can fly into space, I wouldn''t bother.
carbon14
carbon14
arccos(r/(r+h)) is correct
it is all here:
http://www-istp.gsfc.nasa.gov/stargaze/Shorizon.htm
thanks





[edited by - carbon14 on August 13, 2003 11:17:01 AM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.