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$>
References: <iciskk$rs1$> <icj2i1$k8p$> <idlog5$rdc$> <ie5i9q$bja$> <ie7u5u$cs2$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1292421075 22530 (15 Dec 2010 13:51:15 GMT)
NNTP-Posting-Date: Wed, 15 Dec 2010 13:51:15 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1876948
Xref: comp.soft-sys.matlab:695698

"Rob Comer" <> wrote in message <ie7u5u$cs2$>...

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
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. 

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...