필터 지우기
필터 지우기

How to plot a curve tangent to many ellipses.

조회 수: 2 (최근 30일)
Majid
Majid 2021년 3월 8일
댓글: Majid 2021년 9월 23일
Hi everybody,
In the attached figures, we have two kind of curve; 1- a big closed curve which is somehow a limaçon. 2- many ellipses which are the same by the formula but different by the center. In fact, we have the same rotated ellipses whose centers vary on the points on the limaçon. I added two figures in which the number of added ellipses are different (just to make more confortable to understand the question). Now, I want to add a new curve in the figure which is tangent to all the ellipses. For now, I have no idea how to do it.
Any help is appreciated in advance.
I should say that I can add as many as ellipses I want.

채택된 답변

Matt J
Matt J 2021년 3월 10일
You could also try,
P =[X Y];
P = unique(P,'row');
k=convhull(P);
Xh=P(k,1); Yh=P(k,2);
line(Xh,Yh)
  댓글 수: 4
Matt J
Matt J 2021년 9월 21일
You can probably take the convhull() as before to get the envelope points and use an alphaShape() as in this example to plot a surface:
Majid
Majid 2021년 9월 23일
I highly appreciate your suggestion. It worked very well.

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

추가 답변 (2개)

Matt J
Matt J 2021년 3월 8일
alphaShape.boundaryFacets might also be applicable,
  댓글 수: 7
Majid
Majid 2021년 3월 10일
편집: Majid 2021년 3월 10일
Then, if this is the case, I am not getting your point! I am not so familiar with MATLAB functions in particular I know this function since I have seen your comment here. So, could you please let me know how can I get to the outer curve in more details?
PS: As I am not so familiar with MATLAB, I am trying to find out the coordinates of the points on the outer curve mathematically to be able to plot it in MATLAB. I think I will get there in a day.
Matt J
Matt J 2021년 3월 11일
As you may see in the enclosed figures below, I first gathered the coordinates of all the points on all the ellipses in the vectors X and Y, and then tried
It would be advisable to attach your X,Y vectors in a .mat file so that we can demonstrate more directly.

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


darova
darova 2021년 3월 8일
Did you try boundary?
  댓글 수: 1
Majid
Majid 2021년 3월 9일
Thanks! It seems that the link provided by Matt J is about the concept you mentioned. I did not know about these functions, and so I had not tried it. But, I am on it.

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

카테고리

Help CenterFile Exchange에서 Bounding Regions에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by