Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: how to judge if an arc of a great circle crosses a quadrangle and calculate the positions of the intersects of  on a sphere surface
Date: Tue, 16 Mar 2010 03:04:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 14
Message-ID: <hnmsf5$llp$1@fred.mathworks.com>
References: <hnd5rr$4eq$1@fred.mathworks.com> <hnem4s$b39$1@fred.mathworks.com> <hneqe7$frf$1@fred.mathworks.com> <hnim5l$6ga$1@fred.mathworks.com> <hnin7d$mv0$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1268708645 22201 172.30.248.37 (16 Mar 2010 03:04:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 16 Mar 2010 03:04:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1411057
Xref: news.mathworks.com comp.soft-sys.matlab:617129

"Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <hnin7d$mv0$1@fred.mathworks.com>...
> In that case, what kind of curve would you want to use to connect the quadrangle vertices and the arc AB? With differing altitudes, it's obviously no longer a circular arc at the surface of a fixed-radius sphere. You could, for example, connect them via a straight line, or something else. 
> 
> Also, what is the definition of intersection that you will use? If  we're now connecting points with curves not confined to the surface of a sphere, these curves presumably have to intersect as curves in 3D space. What are the odds of that ever happening?


Oh, it's some confusing. I think I must state my question again. 

At first, I deal with my problem on a spherical earth surface. I wanna find the intersection of an arc with a quandragle (in fact, I split a big quandragle into many small congruent grids and I have to solve many such intersection problems). All the lines involved are small arcs of great circle on the sphere. Then, I wanna calculate the length of each segment seperated by the small quandrangles, which is easily dealed with by using function distance(). However, Walter Roberson inspired me that altitude may be nontrival in the computation of distance for my problem. So, for simplicity, I still solve the intersection on a sphere, and then take the altitudes of all the points into consideration in the case of distance calculation. The altitude can be known by GPS records according to the lat and long. If two points have the same altitude, their distance is still calculated as a great 
circle(thus the straight-line suggestion is invalid). But if one point is higher, their distance should be longer. I ever asked in the 3rd post if this works(whether it can be treated as a right triangle on a plane): d1 = distance([latA,lonA], [latB,lonB]); d2 = sqrt(d1^2+(altA-altB)^2);. 

To conclude, my first problem is still the same, namely, the intersection-point problem on a sphere. And then, I wanna calculate the length of each segment with altitude involved. The maximum distance doesnot exceed 5 degrees.

(BTW, I'm dealing with the inversion of surface wave, actually.)