How to plot a curve tangent to many ellipses.

4 views (last 30 days)
Majid
Majid on 8 Mar 2021
Commented: Majid on 23 Sep 2021
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.

Accepted Answer

Matt J
Matt J on 10 Mar 2021
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 Comments
Majid
Majid on 23 Sep 2021
I highly appreciate your suggestion. It worked very well.

Sign in to comment.

More Answers (2)

Matt J
Matt J on 8 Mar 2021
alphaShape.boundaryFacets might also be applicable,
  7 Comments
Matt J
Matt J on 11 Mar 2021
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.

Sign in to comment.


darova
darova on 8 Mar 2021
Did you try boundary?
  1 Comment
Majid
Majid on 9 Mar 2021
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.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!