HOME

TheInfoList



OR:

Boolean operations on polygons are a set of Boolean operations (AND, OR, NOT, XOR, ...) operating on one or more sets of
polygon In geometry, a polygon () is a plane figure made up of line segments connected to form a closed polygonal chain. The segments of a closed polygonal chain are called its '' edges'' or ''sides''. The points where two edges meet are the polygon ...
s in computer graphics. These sets of operations are widely used in
computer graphics Computer graphics deals with generating images and art with the aid of computers. Computer graphics is a core technology in digital photography, film, video games, digital art, cell phone and computer displays, and many specialized applications. ...
, CAD, and in EDA (in
integrated circuit An integrated circuit (IC), also known as a microchip or simply chip, is a set of electronic circuits, consisting of various electronic components (such as transistors, resistors, and capacitors) and their interconnections. These components a ...
physical design and verification software). These are also used for activities like rapid
prototyping A prototype is an early sample, model, or release of a product built to test a concept or process. It is a term used in a variety of contexts, including semantics, design, electronics, and software programming. A prototype is generally used to ...
in product design, medical device development, or even the creation of elaborate artworks.


Algorithms

* Greiner–Hormann clipping algorithm * Vatti clipping algorithm * Sutherland–Hodgman algorithm (special case algorithm) * Weiler–Atherton clipping algorithm (special case algorithm)


Uses in software

Early algorithms for Boolean operations on polygons were based on the use of bitmaps. Using bitmaps in modeling polygon shapes has many drawbacks. One of the drawbacks is that the memory usage can be very large, since the resolution of polygons is proportional to the number of bits used to represent polygons. The higher the resolution is desired, the more the number of bits is required. Modern implementations for Boolean operations on polygons tend to use plane sweep algorithms (or Sweep line algorithms). A list of papers using plane sweep algorithms for Boolean operations on polygons can be found in References below. Boolean operations on
convex polygon In geometry, a convex polygon is a polygon that is the boundary of a convex set. This means that the line segment between two points of the polygon is contained in the union of the interior and the boundary of the polygon. In particular, it is ...
s and monotone polygons of the same direction may be performed in
linear time In theoretical computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations ...
..


See also

*
Boolean algebra In mathematics and mathematical logic, Boolean algebra is a branch of algebra. It differs from elementary algebra in two ways. First, the values of the variable (mathematics), variables are the truth values ''true'' and ''false'', usually denot ...
* Computational geometry * Constructive solid geometry, a method of defining three-dimensional shapes using a similar set of operations *
Geometry processing Geometry processing is an area of research that uses concepts from applied mathematics, computer science and engineering to design efficient algorithms for the acquisition, 3D reconstruction, reconstruction, analysis, manipulation, simulation and ...
* General Polygon Clipper, a C library which computes the results of clipping operations


Notes


Bibliography

* Mark de Berg, Marc van Kreveld, Mark Overmars, and Otfried Schwarzkopf, Computational Geometry - Algorithms and Applications, Second Edition, 2000 * Jon Louis Bentley and Thomas A. Ottmann
Algorithms for Reporting and Counting Geometric Intersections
IEEE Transactions on Computers, Vol. C-28, No. 9, September 1979, pp. 643–647 * Jon Louis Bentley and Derick Wood
An Optimal Worst Case Algorithm for Reporting Intersections of Rectangles
IEEE Transactions on Computers, Vol. C-29. No. 7, July 1980, pp. 571–577 * Ulrich Lauther
An O(N log N) Algorithm for Boolean Mask Operations
18th Design Automation Conference, 1981, pp. 555–562 * James A. Wilmore
Efficient Boolean Operations on IC Masks
18th Design Automation Conference, 1981, pp. 571–579 * * Thomas Ottmann, Peter Widmayer, and Derick Wood,
A Fast Algorithm for the Boolean Masking Problem
" Computer Vision, Graphics, and Image Processing, 30, 1985, pp. 249–268


External links


UIUC Computational Geometry Pages


by Dave Eberly. ;Software * Michael Leonov has compiled

* Angus Johnson has als
compared three clipping libraries
* SINED GmbH ha
compared performance and memory utilization of three polygon clippers
. * A comparison of 5 clipping libraries a

* A commercial library for 3D Boolean operations
sgCore C++/C# library
* Th
comp.graphics.algorithms FAQ
solutions to mathematical problems with 2D and 3D Polygons. * Matthias Kramm'
gfxpoly
a free C library for 2D polygons (BSD license). * Klaas Holwerda'

a C++ library for 2D polygons. * David Kennison'
Polypack
a FORTRAN library based on the Vatti algorithm. * Klamer Schutte'
Clippoly
a polygon clipper written in C++. * Michael Leonov'

a C++ library, which extends the Schutte algorithm. * Angus Johnson'
Clipper
an open-source freeware library (written in Delphi, C++ and C#) that's based on the Vatti algorithm.
clipper2 crate
a safe Rust wrapper for Angus Johnson's Clipper2 library. * Nail Sharipov’

Rust Polygon Boolean Operations library: Supports intersection, union, difference, xor, and self-intersections for all polygon varieties.

a commercial library available in C++ and C#. * Alan Murta'
GPC
, General Polygon Clipper library.
PolygonLib
{{Webarchive, url=https://web.archive.org/web/20121116204221/http://www.ulybin.de/products/polygonlib.php?lang=en , date=2012-11-16 , C++ and COM libraries for 2D polygons (optimized for large polygon sets, built-in spatial indices). Geometric algorithms Geometry processing