plot an arc between two points

Hello,
I have two 3d points on a unit sphere, which are A1(x1,y1,z1) and A2(x2,y2,z2). I want to connect A1 and A2 points and draw an arc. Then my code like this: P = [A1;A2];
plot3(P(:,1),P(:,2),P(:,3)). However, by this way, the connect line between A1 and A2 is a straight line instead of an arc. My plot like below,
Many thanks for your help in advance.

 採用された回答

KSSV
KSSV 2020 年 12 月 3 日

1 投票

First get the radius of sphere....I hope center is (0,0,0). To get radius use:

3 件のコメント

Alan
Alan 2020 年 12 月 3 日
Exactly! The radius of the unit sphere is 1. And the center of the sphere is (0,0,0). So can you tell me that how can I get the correct plot? Thanks so much.
Alan
Alan 2020 年 12 月 6 日
Thank you.

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

その他の回答 (0 件)

カテゴリ

質問済み:

2020 年 12 月 3 日

コメント済み:

2020 年 12 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by