Find space two straight intersections - MATLAB code + principle description