Borrar filtros
Borrar filtros

find angle between tangent and line

24 visualizaciones (últimos 30 días)
Sharatkumar Kondikoppa
Sharatkumar Kondikoppa el 25 de En. de 2022
Comentada: Sharatkumar Kondikoppa el 3 de Oct. de 2023
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 ?

Respuestas (1)

Milan Bansal
Milan Bansal el 3 de Oct. de 2023
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!

Categorías

Más información sobre Geometric Transformation and Image Registration en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by