Click here to Skip to main content
15,899,025 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Algorithm to sort list (Reply to All) Pin
TheConfusedGuy7-May-09 18:27
TheConfusedGuy7-May-09 18:27 
GeneralRe: Algorithm to sort list (Reply to All) Pin
dybs7-May-09 19:01
dybs7-May-09 19:01 
GeneralRe: Algorithm to sort list (Reply to All) Pin
TheConfusedGuy7-May-09 19:07
TheConfusedGuy7-May-09 19:07 
Questionbearing angle calculation Pin
ranjanguru6-May-09 22:45
ranjanguru6-May-09 22:45 
AnswerRe: bearing angle calculation Pin
molesworth6-May-09 23:38
molesworth6-May-09 23:38 
GeneralRe: bearing angle calculation Pin
ranjanguru6-May-09 23:48
ranjanguru6-May-09 23:48 
GeneralRe: bearing angle calculation Pin
molesworth7-May-09 0:06
molesworth7-May-09 0:06 
GeneralRe: bearing angle calculation Pin
molesworth8-May-09 3:13
molesworth8-May-09 3:13 
I've been having a bit more of a think about this, and I'm not sure there is a valid concept of a bounding box for a circle on a sphere - or not a simple one anyway.

Working in Lat/Long coordinates, there are a number of problem areas. If you define the "sides" of the box as the meridians at centre+radius and centre-radius Long, and the top and bottom as the similarly defined parallels of Latitude, you can get a "box" of sorts provided the circle is reasonably small, and not near or at either of the poles.

If the circle contains a pole, then the sides actually cross inside the circle, and the top or bottom may also intersect it. If the circle is centred on the pole, then there is no way to define a box at all.

Also, if the circle is a great circle around a meridian, then the circle itself is the box (with only two sides and no vertices)!

Going for an alternative approach, the bounding box could be defined as the intersections of four great circles. Each is defined as the great circle tangent to a particular point on your circle's circumference, with those points spaced at 90 degrees around it. This should define a box independently of any Lat/Long coordinate system, and will only have one degenerate case of the test circle being a great circle. Although if the first point is chosen to be at the "top" of the circle, it will, I think, be similar to the Lat/Long aligned one.

I'm not sure how to calculate the coordinates of the vertices of this new "box", or why you would want them, but it has made me think a lot about spherical geometry, and I might even write a quicky visualiser to look at this in more detail.

What does the "box" represent? What about other bounding shapes - hexagons, octagons? What can we say about limits, areas, volumes? Lots of questions, which have nothing to do with navigation, but are very interesting...

Cheers, and thanks for exercising my brain Big Grin | :-D

There are three kinds of people in the world - those who can count and those who can't...

AnswerRe: bearing angle calculation Pin
OriginalGriff6-May-09 23:52
mveOriginalGriff6-May-09 23:52 
GeneralRe: bearing angle calculation Pin
ranjanguru6-May-09 23:57
ranjanguru6-May-09 23:57 
AnswerRe: bearing angle calculation Pin
Stuart Cox7-May-09 11:01
Stuart Cox7-May-09 11:01 
AnswerRe: bearing angle calculation Pin
cp98768-May-09 15:30
cp98768-May-09 15:30 
QuestionPolygon Rendering Performance Optimization Pin
StarBP6-May-09 11:27
StarBP6-May-09 11:27 
QuestionWhich language is this Urgent help required Pin
Sanjaykalsi5-May-09 22:55
Sanjaykalsi5-May-09 22:55 
AnswerRe: Which language is this Urgent help required Pin
OriginalGriff5-May-09 23:03
mveOriginalGriff5-May-09 23:03 
QuestionTrying to create a for loop that gives all Unique combinations without using recursive process. Pin
luke.orun5-May-09 13:49
luke.orun5-May-09 13:49 
AnswerRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
Luc Pattyn5-May-09 14:41
sitebuilderLuc Pattyn5-May-09 14:41 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
luke.orun5-May-09 22:09
luke.orun5-May-09 22:09 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
Luc Pattyn5-May-09 23:42
sitebuilderLuc Pattyn5-May-09 23:42 
AnswerRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
StarBP6-May-09 11:20
StarBP6-May-09 11:20 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
luke.orun6-May-09 12:08
luke.orun6-May-09 12:08 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
Luc Pattyn6-May-09 13:12
sitebuilderLuc Pattyn6-May-09 13:12 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
luke.orun10-May-09 12:59
luke.orun10-May-09 12:59 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. [modified] Pin
Luc Pattyn10-May-09 13:19
sitebuilderLuc Pattyn10-May-09 13:19 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
luke.orun11-May-09 2:27
luke.orun11-May-09 2:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.