connect two points on sphere

4 ビュー (過去 30 日間)
Mari Alqarni
Mari Alqarni 2016 年 3 月 29 日
編集済み: Mari Alqarni 2016 年 4 月 1 日
I want to connect at least 2 points on a sphere. The first point is at north pole (0,0,1). I am struggling with how to connect these successive points using the loop. I appreciate your help. Here is how I start:
wx0=0;
wy0=0;
wz0=1;
w0=[wx0;wy0;wz0];% initial position at north pole
% use the vector in spherical coordinates to update the position
%w=[sin(theta)*cos(phi);sin(theta)*sin(phi);cos(theta)];
where theta is the angle that w makes with the z axis and is between zero and pi. phi is the angle that the projection of w in xy plane makes with x axis and it is between zero and 2 pi. So the initial angles are theta=0 and phi=0 because I am at the north pole. The angles will be updated by solving a system of ODE and then use the solution to locate w position (say w1) then obtain new theta and phi and substitute in w to locate w2 (second point that I need to move to) an so on. Suppose I want to move 100 points from the north pole ( my initial position) so I need to use for loop to obtain the w1 , w2 ,..., w100. From this point, I do not know how to proceed.
  2 件のコメント
Geoff Hayes
Geoff Hayes 2016 年 3 月 29 日
Mari - you may want to show your code so that we can get a better idea of what you are trying to attempt.
Geoff Hayes
Geoff Hayes 2016 年 3 月 31 日
編集済み: Geoff Hayes 2016 年 3 月 31 日
Mari - what are phi and theta? Also, where is the loop that you mention in your question? Why is it necessary?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by