ppt课件-analysisanddesignofalgorithms.pptVIP

  • 1
  • 0
  • 约3.64千字
  • 约 11页
  • 2017-01-25 发布于四川
  • 举报
ppt课件-analysisanddesignofalgorithms

Computational Geometry (35/33) Line Segments and cross-product Segment intersection and Sweep Line Convex Hull and Graham’s Scan, Jarvis’s march Divide-and-Conquer for Closest Pair. Line Segments and cross-product (35.1/33.1) A segment is a convex combination of ends p1 = (x1,y1) and p2 = (x2,y2) x = ? x1+ (1-?) x2, y = ? y1+ (1-?) y2 p = ? p1+ (1-?) p2 Cross product p1 ? p2 = x1 y2 -x2 y1 Vectors are collinear if p1 = c p2, cross-product=0 The segment [p0p1] and [p0p2] turns left or right if (p1-p0) ? (p2-p0) 0 (0) Segment intersection: bounding boxes straddling Segments and Sweep Lin

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档