the arc using the chord

조회 수: 7 (최근 30일)
nil la
nil la 2024년 2월 20일
댓글: Matt J 2024년 2월 20일
Hello Dears
Is it possible to draw an arc using only the chord in front of it without any other information?
  댓글 수: 9
Catalytic
Catalytic 2024년 2월 20일
Is it possible to draw an arc using only the chord in front of it
Several problems -
  1. Not all arcs are circular, although the others seem to have assumed that's what you mean.
  2. There is no unique circle passing through two given chord tips (see also David Goodmanson).
  3. A chord has no "front". You will need to decide somehow on which side of the line segment the arc is supposed to run.
nil la
nil la 2024년 2월 20일
Yes that's right.

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

답변 (2개)

Matt J
Matt J 2024년 2월 20일
편집: Matt J 2024년 2월 20일
Assume the chord is of length L and, with no loss of generality, assume also that it is aligned with the x-axis with end points at ±L/2. Let the user select any 3rd point on the y-axis [0,b]. Then you can use circularFit from this FEX download to render the circular arc running through all three points,
Once you've done this, you can rotate translate the points to any desired position off the x-axis.
L=10; b=2; %User input
xy=[-L/2,0;+L/2,0;0,b]';
plot( circularFit(xy) )
  댓글 수: 6
nil la
nil la 2024년 2월 20일
Thank you for your guidance
Matt J
Matt J 2024년 2월 20일
You're welcome, but if your question has been addressed by one of the answers, please Accept-click the apporpriate one.

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


John D'Errico
John D'Errico 2024년 2월 20일
Your question is far too general, too vague to have an answer.
There are infinitely many "arcs" that will pass through two points. Even if we assume specifically circular arcs, there are infinitely many such arcs, as the radius of that circle can be almost anything. So, is it possible? Um, no. There is no unique circular arc, given only a chord. As such, "THE" arc cannot be drawn, since it is not unique.
Worse, even if you know the radius of the circle you would choose, assuming that the radus is validly chosen, there are always FOUR possible circular arcs for any chord. So again, no, it is not possible to choose between them. (You might guess there are two, but in fact, there are four possible circular arcs. Think about it. Two of the possible arcs are longer than the other two arcs.) For example, consider the chord connecting two points, I'll choose them arbitrarily as (0,0) and (1,1). Pick a circular radius of 5 units. (I chose 5 units her because it allows the centers to be integers. And I needed to solve a variation of the Pell equation to know that, specifically one of the form 2*R^2-1==z^2. Here we are interested in integer solutions for R.) Anyway, there are two possible circles we might care about, each of which can supply two potential arcs.
R = 5;
syms x y cx cy
Circ = (x - cx)^2 + (y - cy)^2 == R^2;
cxy = solve(subs(Circ,[x,y],[0 0]),subs(Circ,[x,y],[1 1]),[cx,cy])
cxy = struct with fields:
cx: [2×1 sym] cy: [2×1 sym]
cxy.cx
ans = 
cxy.cy
ans = 
So those represent the two possible circles that have the indicated chord, AND have a radius of 5 units. We can draw the circles and the chord as...
t = linspace(0,2*pi);
plot([0 1],[0 1],'k-o',4 + R*cos(t),-3 + R*sin(t),'r-',-3 + R*cos(t),4 + R*sin(t),'r-')
axis equal
Again, there are 4 such possibe arcs drawn there.
If you further specify you desire the shorter of those potential circular arc for a given radius and a given chord, there are still two such arcs, and no valid way to choose between them, as they have the same arc length. So again, you still will not have sufficient information to decide between them.
So is it possible to draw an arc? Well, yes, in theory. But to do so automatically, no. You have not provided sufficient information.
  댓글 수: 1
nil la
nil la 2024년 2월 20일
Yes, you are right, thank you for your help

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

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by