Intersection line and quadrilateral
显示 更早的评论
Hi everyone, I found something about this, but nothing as simplified as I'm looking for.
I have a line expressed with a series of x and y coordinates
x_l = [0 1 5 4 8];
y_l = [1 4 2 2 3];
and a quadrilateral area identified with the coordinates of its 4 angular nodes in counterclockwise order (it should be a generical quadrilateral, but I can assume it's a square if it's too articulated):
% ex: square
A_x = [3 4 4 3];
A_y = [2 2 3 3];
I need to verify if the line intersect the area... Just to verify, not to find the intersection.
I've found some methods online, but all of them are exaggerated and heavy for my purposes ("polyxpoly" for example); I have many squares and many lines to be processed and i just need a true or false flag in the fastest way possible. Maybe it's super simple, or maybe not, but nothing comes to my mind!
Thanks to anyone who wants to help me!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Sparse Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!