View Single Post
  #8  
Old October 9th 03, 07:25 PM
Julian Scarfe
external usenet poster
 
Posts: n/a
Default

"Sims" wrote in message
...

I am trying to draw lat/lon 'lines' on the screen.
But to be efficient i need to cut the lines so that i do not draw them out
of the screen.

Normally, (on a 2D plane), i would have the line i wish to draw and make

it
fit into the rectangle created my rectangle.

My the problem with great circle is that the lines are not straight, (well
they are but not on a flat Earth representation).

So i would have a box where the corners themselves would be latitude and
longitudes and using them i could cut my original 'line' to make it fit on

a
flat screen.
I hope i did not confuse the matter more by trying to explain it.


Ok, so the problem is that you want to draw the great circle from (say) 50N
10W to 51N 20W, which is almost east-west. If you were doing a plot with a
cylindrical projection (e.g. mercator) where everything is rectangular, you
could be confident that the line would be contained within the rectangle
((50,10), (51, 20)). But you know very well that the great circle is going
to go some considerable way north of 51N, so you can't use that as the upper
limit of your rectangle.

If that's the problem, the solution is to use Clairaut's formula, which is
of course in Ed's Aviation Formulary, to find the maximum latitude it
reaches:
http://williams.best.vwh.net/avform.htm#Clairaut

Hope that helps

Julian Scarfe