How to plot circular arc passes through 3 points ?

조회 수: 17 (최근 30일)
Atakan Zeybek
Atakan Zeybek 2020년 7월 21일
편집: Bruno Luong 2020년 7월 22일
Hello All,
I am trying to write a program which generates arc passes through 3 given points. To do that, I have written the code which finds the circle passes through 3 points, and calculated the angle of these points. I am making program plot between first and last points' angle values. However, linspace function creates a problem because it always takes the CCW. depending on middle point it can be CW. Is there any function or program which creates an arc given 3 points ? or is there any method like linspace which can wrap values around 2pi ?

채택된 답변

Atakan Zeybek
Atakan Zeybek 2020년 7월 22일

추가 답변 (1개)

Bruno Luong
Bruno Luong 2020년 7월 21일
편집: Bruno Luong 2020년 7월 22일
Assuming you have angle vector in radian. Change
anglevectorCCW = linspace(angle1, angle2)
to
anglevectorCW = linspace(min(angle1,angle2),max(angle1,angle2)-2*pi);
for plot the other part of the circle.
  댓글 수: 2
Atakan Zeybek
Atakan Zeybek 2020년 7월 22일
points = [6 4;9 3;10 4];
it did not work for these points, unfortunately.
Bruno Luong
Bruno Luong 2020년 7월 22일
편집: Bruno Luong 2020년 7월 22일
Show us your corresponding angle values, input arguments of LINSPACE and the command of plot the arc.
Don't care about the "points", which I have no clue why it's 3 x 1 array, doesn't make any sense since you seem to describe 3 points in the plane.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by