Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Plot latitude-longitude of a cone
Date: Wed, 15 Dec 2010 13:51:15 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 35
Message-ID: <ieah4j$m02$1@fred.mathworks.com>
References: <iciskk$rs1$1@fred.mathworks.com> <icj2i1$k8p$1@fred.mathworks.com> <idlog5$rdc$1@fred.mathworks.com> <ie5i9q$bja$1@fred.mathworks.com> <ie7u5u$cs2$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1292421075 22530 172.30.248.35 (15 Dec 2010 13:51:15 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 15 Dec 2010 13:51:15 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1876948
Xref: news.mathworks.com comp.soft-sys.matlab:695698

"Rob Comer" <rob.comer.nospam@mathworks.com> wrote in message <ie7u5u$cs2$1@fred.mathworks.com>...

Ok I'll try to elaborate everything I mentioned in above posts.

There's a circle above a sphere ( for e.g., a view-cone of a satellite orbiting the Earth). I have to plot the area covered by the circle (so, essentially a small-circle with a radius "r" (scircle1)) on a latitude-longitude map. 

There are several view-cones (circles) looking at the Earth in different angles. 
<<<< for e.g., if it's only one circle then the calculation becomes simpler.
theta1,2 = latitude
phi1,2 = longitude
alfa = cone width (radius)

theta1, phi1 and alfa are known values
Thus;
cos(theta1)*cos(theta2)*cos(phi1)*cos(phi2) + cos(theta1)*cos(theta2)*sin(phi1)*sin(phi2) + sin(theta1)sin(theta2) = cos(alfa)

then I can draw the corresponding circle in Matlab as;
[atheta1, aphi1] = antipode(theta1,phi1) % antipode of theta1 and phi1
[theta2, phi2]=scircle1(atheta1,phi1,alfa)
plot(theta2,phi2,'-k') >>>>

Therefore, I have the following rotation matrix from which I calculate the position and attitude of the view-cones.

R1=[cos(theta) 0 sin(theta); 0 1 0; -sin(theta) 0 cos(theta)]
R2=[cos(pi/4) sin(pi/4) 0; -sin(pi/4) cos(pi/4) 0; 0 0 1]
so as you can see we rotate only on x and z axes. 
R1R2=[3x3MATRIX]

n1=[sin(theta);0;cos(theta)] % n1 is the first circle and correspond to the 3rd column of R1R2 matrix (z axis).

angle theta is the latitude in degrees. We are on  the prime meridian, so longitude is 0.
radius of the circle is also known in degrees.

Now the issue I'm confronted with is to draw n1. any ideas?
Please let me know if the information is not clear to you...