필터 지우기
필터 지우기

find angle between tangent and line

조회 수: 24 (최근 30일)
Sharatkumar Kondikoppa
Sharatkumar Kondikoppa 2022년 1월 25일
댓글: Sharatkumar Kondikoppa 2023년 10월 3일
I wanted to finding angle between camera center line (green vertical line ) and tangent(red line) drawn to the parabolic points (blue dots).But I am not finding any intersection point in it.Anyone can help me in finding angle ?

답변 (1개)

Milan Bansal
Milan Bansal 2023년 10월 3일
Hi,
I understand that you are trying to find the angle between the vertical line and the tangent line as you are unable to find the intersection point.
If the equations of the lines are present in "y = mx + b" format, find the intersection point of the lines as shown in the code below.
x0 = (b2-b1)/(m1-m2); %find the x point
y0 = m1*x0+b1;
Find another point on each of the two lines, (x1, y1) and (x2, y2).
Use the "atan2" function to find the angle between the lines using these points and the intersection point (x0, y0) calculated above.
v1 = [x1, y1, 0] - [x0, y0, 0];
v2 = [x2, y2, 0] - [x0, y0, 0];
Theta = atan2(norm(cross(v1, v2)), dot(v1, v2));
Refer to the below MathWorks documentation link to learn more about "atan2" function.
Hope it helps!

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by