How can I find if a line and a circle intersect.

조회 수: 2 (최근 30일)
STEFANOS PAPADAKIS
STEFANOS PAPADAKIS 2019년 3월 14일
댓글: STEFANOS PAPADAKIS 2019년 3월 14일
I have and obstacle in the form of a circle and I am making a line in the form of a path. I would like to know if the is a way to check wether those two intersect or not. I have seen a line of code P=InterX(L1,L2) where L1,L2 are the equations of the circle and the line respectively. Is there any other way?

답변 (1개)

Raghunandan V
Raghunandan V 2019년 3월 14일
If you have the matrix data with you then you can try to find common numbers between those two matrices.
intersect(A,B);
This gives the code to find common numbers between 2 matrices
  댓글 수: 3
Raghunandan V
Raghunandan V 2019년 3월 14일
No. If you dont have the equation and you have the points on circle and line then it will the give the intersecting points but this is a bad way to do it. the better way would be to make a formula and use it .
STEFANOS PAPADAKIS
STEFANOS PAPADAKIS 2019년 3월 14일
Ok thank you very much!

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

카테고리

Help CenterFile Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by