Donate Javascript Clipper Project
This page presents primary boolean operations between two sets of polygons. The subject polygon is blue and clip is red. Both sets have 23 sub polygons each consisting of four points. Which means that subject polygon as well as clip polygon has 92 points, totally 184 points.
The result of boolean operations produced about 800- 2300 points. This huge addition in point count is due to self intersections of source polygons. Because they are generated randomly (in Javascript) without check for self intersections, this means that intersection points are added by Clipper library during execution of boolean operations. The result of boolean operations of Clipper library has never self intersection points (at least according to my tests with thousands of examples).
These examples are screen captures of Main Demo program, which uses Javascript Clipper library.
Random Polygons - None
Below we see Subject and Clipping polygons without any modifications.
Random Polygons - Intersection
Below we see Intersection of both polygons.
Random Polygons - Union
Below we see Union of both polygons.
Random Polygons - Difference
Below we see Difference of both polygons.
Random Polygons - Xor
Below we see Xor of both polygons.