geometry - How to find the locus of common points of two segments that belong to the same line -
geometry - How to find the locus of common points of two segments that belong to the same line -
i read various related answers. in particular here (how observe 2 line segments intersect?) explained how find intersection between 2 segments , check parallelism , if belong same line. wrote fortran programme next great idea. problem consists of finding union segment when 2 segments belong same line. here found c++ code (detecting coincident subset of 2 coincident line segments) not explained , cant read c++ fortran (here useful image depiction problem, posted in question no useful reply http://judark.myweb.hinet.net/parallel.jpg ). best language-agnostic algorithm find locus of mutual points (i.e. union segment, i.e. 2 points defining union) of 2 segments belonging same line? have managed planty of "if" computing manhattan distances between points (http://en.wikipedia.org/wiki/taxicab_geometry) wondering if there improve way it. a.
if 2 segments on same line , overlap, union segment between 2 of 4 end points farthest apart 1 another. compute squared distances (no need compute square roots) , identify pair maximal distance. approach handles many degenerate cases nicely, including case 4 points coincide , union of 2 equal points point.
geometry segments
Comments
Post a Comment