Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Intersect two lists of line segments

@type segs1: List
@param segs1: The first list of line segments, i.e. a list of 2-tuples of vectors

@type segs2: List
@param segs2: The second list of line segments, i.e. a list of 2-tuples of vectors

@return: The list of intersections or an empty list

src/p/y/Py2D-HEAD/py2d/FOV.py   Py2D(Download)
 
		# find all obstructors intersecting the vision polygon
		boundary_intersection_points = py2d.Math.intersect_linesegs_linesegs(obs_segs, list(zip(boundary.points, boundary.points[1:])) + [(boundary.points[-1], boundary.points[0])])
 
		if self.debug: self.debug_points.extend([(p, 0xFF0000) for p in visible_points])