Determine the intersection Point of the two Diagonals in a quadrilateral
7 ビュー (過去 30 日間)
古いコメントを表示
Hey people,
is there an easy way of dermining the intersection points of two diagonals in a quadriliteral??
Doing it by hand is quite hard since there are many special cases to consider. maybe there is already a function that helps solving the problem?
With best regards, John
1 件のコメント
Ryan Cho
2017 年 12 月 20 日
If you are doing this on a graph get the x values of the coordinates and average them, then get the y values of the coordiantes and averagae them and then there you go (I've only tried this with parralellograms so far bu good luck)
採用された回答
Image Analyst
2013 年 5 月 17 日
Calculate the equation of the two lines and set them equal, and solve for x, and then plug in x into either equation and get y. Just basic math
m1*x+b1 = m2*x+b2
and so on to solve for x. m is just the slope deltaY/deltaX you get from using your two diagonal points. You can use
coeffs = polyfit(x,y,1); % coeffs(1) = m, coeffs(2) = b
if you want.
4 件のコメント
Image Analyst
2013 年 5 月 17 日
You HAVE to know the order of the points going around the quadrilateral. If you don't know the order, then there are multiple possible quadrilaterals you could build from the same set of points. So, because you must know the order, your diagonals are always points 1 and 3, and points 2 and 4. Always.
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Operating on Diagonal Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!