Drawing an arc between two elements?

3 ビュー (過去 30 日間)
ErikJon Pérez Mardaras
ErikJon Pérez Mardaras 2020 年 10 月 22 日
I want to draw an arc (given its centre and its radius) between two elements.
For example the case given in the image below. I would like to draw an arc (of radius 0.5 (as an example) and the centre de point P drawed) strictly between those two lines
What is the general case of doing it? I mean, in this particular case there are two lines, but I would like a method that would work for whatever elements between I'd want to draw an arc (between a circle and a line, between two circles...etc).
  2 件のコメント
KSSV
KSSV 2020 年 10 月 22 日
You have not commented on your previous question...
If the answer worked for you..you have to acknowledge the users who have helped you. With out closing that question, you are asking another question similiar ti it?
ErikJon Pérez Mardaras
ErikJon Pérez Mardaras 2020 年 10 月 22 日
sorry, my fault

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

採用された回答

KSSV
KSSV 2020 年 10 月 22 日
L1=[1 3;
1 6]
L2=[-2 2;
8 -1]
P=InterX(L1,L2);
L = [L2(:,1) P L1(:,2)] ;
p = polyfit(L(1,:),L(2,:),2) ;
xi = linspace(min(L(1,:)),max(L(1,:))) ;
yi = polyval(p,xi) ;
figure
hold on
plot(L1(1,:),L1(2,:),'r')
plot(L2(1,:),L2(2,:),'b')
plot(P(1),P(2),'ro')
plot(xi,yi,'k')
  7 件のコメント
KSSV
KSSV 2020 年 10 月 23 日
xc = 2+0.5*cos(Th) ;
yc = 10+0.5*sin(th) ;
ErikJon Pérez Mardaras
ErikJon Pérez Mardaras 2020 年 10 月 25 日
thanks!

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

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by