tangent point between two circle problem
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi:
I have two circle that does not intersect with each other, the radius and center coordinates are known. there should have four tangent lines (two inner and two outer) and are cooresponding to four pair of tangent points.
I need the four pair of tangent points.
is there anyway to do it in Matlab?
Thanks!
Yu
댓글 수: 3
Jan
2019년 1월 29일
@Yu Li: You have asked a valid question concerning Matlab. You got an answer, which might be useful for other also, when they search for the same keywords. So there is no reason to remove the question. If you consider your problem as solved, you can use the "Accept" button to inform the readers, that this question does not need further asnwers.
David Goodmanson
2019년 1월 29일
편집: David Goodmanson
2019년 1월 29일
Hi YL,
I went a bit over the top on my original comment, which was not necessary. Since you appear to have deleted the comment I was responding to, I am deleting mine as well.
I agree with Jan that there is no need to remove the question since Jan's answer has useful information.
채택된 답변
Jan
2019년 1월 28일
편집: Jan
2019년 1월 28일
It is recommended to search in the net or especially in this forum before posting a new question. What about this solution: https://www.mathworks.com/matlabcentral/answers/162912-tangent-to-two-circles
This thread contains the suggestion to solve the easy mathematical problem at first, because the implementation is not hard: https://www.mathworks.com/matlabcentral/answers/419870-how-to-find-the-center-of-a-circle-given-two-tangent-lines-and-radius-using-matlab
In the net you will find this also in a few seconds: https://codereview.stackexchange.com/questions/193239/draw-common-tangents-to-two-circles-interactively-in-matlab
The mathematical solution contains the step to create the tangents between the center of the smaller circle to two circles with the same center as the larger one, but with the radii R_large +/- R_small. Now the wanted points are obtained by a parallel movement. See e.g. http://mathworld.wolfram.com/Circle-CircleTangents.html
Further approaches: https://en.wikipedia.org/wiki/Tangent_lines_to_circles
You are right: maybe such a function has been published in the File Exchange already. Then it is recommended to search by your own at first, and if this is not successful, to mention "I've searched in the FEX with these terms already: ..."
See: FEX: Common external tangents (I've mentioned how to expand this for the inner tangents: Replace r2-r1 by r2+r1)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!