项目作者: toanqng

项目描述 :
Martinez algorithm for polygon Boolean operations
高级语言: Go
项目地址: git://github.com/toanqng/martinez-rueda.git
创建时间: 2020-11-19T03:11:03Z
项目社区:https://github.com/toanqng/martinez-rueda

开源协议:MIT License

下载


Martinez-Rueda polygon boolean operations algorithm

PHP implementation of original algorithm http://www4.ujaen.es/~fmartin/bool_op.html

Algorithm is used for computing Boolean operations on polygons:

  • union
  • difference
  • intersection
  • xor

    Usage

    Input parameter is a multipolygon - an array of polygons. And each polygon is an array of points x,y.
    1. TODO

    Some visual examples

    Let’s consider two polygons: green multipolygon of two polygons and yellow polygon.

Snow-white polygon is result of Boolean operation on two polygons.

Union

Difference (green NOT yellow)

Intersection

Xor

Thanks To kudm761 at https://github.com/kudm761/martinez-rueda-php