Computational Geometry
Computational Geometry
INTRODUCTION
Computational geometry is a branch of computer science devoted to the study of
algorithms which can be stated in terms of geometry. Some purely geometrical problems
arise out of the study of computational geometric algorithms, and such problems are also
considered to be part of computational geometry. While modern computational geometry is a
recent development, it is one of the oldest fields of computing with history stretching back to
antiquity.
The main impetus for the development of computational geometry as a discipline was
progress in computer graphics and computer-aided design and manufacturing (CAD/CAM),
but many problems in computational geometry are classical in nature, and may come
from mathematical visualization.
• Given n points in the plane, find the two with the smallest distance from each other.
One could compute the distances between all the pairs of points, of which there are n(n-1)/2,
then pick the pair with the smallest distance. This brute-force algorithm takes O(n2) time; i.e. its
execution time is proportional to the square of the number of points. A classic result in
computational geometry was the formulation of an algorithm that takes O(n log n). Randomized
algorithms that take O(n) expected time,[3] as well as a deterministic algorithm that takes O(n log
log n) time,[4] have also been discovered.
PROBLEM CLASSES
The core problems in computational geometry may be classified in different ways, according to
various criteria. The following general classes may be distinguished.
Static problems
In the problems of this category, some input is given and the corresponding output needs to be
constructed or found. Some fundamental problems of this type are:
• Convex hull: Given a set of points, find the smallest convex polyhedron/polygon containing
all the points.
• Line segment intersection: Find the intersections between a given set of line segments.
• Delaunay triangulation
• Voronoi diagram: Given a set of points, partition the space according to which points are
closest to the given points.
• Linear programming
• Closest pair of points: Given a set of points, find the two with the smallest distance from each
other.
• Largest empty circle: Given a set of points, find a largest circle with its center inside of their
convex hull and enclosing none of them.
• Euclidean shortest path: Connect two points in a Euclidean space (with polyhedral obstacles)
by a shortest path.
• Polygon triangulation: Given a polygon, partition its interior into triangles
• Mesh generation
• Boolean operations on polygons
The computational complexity for this class of problems is estimated by the time and space
(computer memory) required to solve a given problem instance.
• Range searching: Preprocess a set of points, in order to efficiently count the number of
points inside a query region.
• Point location: Given a partitioning of the space into cells, produce a data structure that
efficiently tells in which cell a query point is located.
• Nearest neighbor: Preprocess a set of points, in order to efficiently find which point is closest
to a query point.
• Ray tracing: Given a set of objects in space, produce a data structure that efficiently tells
which object a query ray intersects first.
If the search space is fixed, the computational complexity for this class of problems is usually
estimated by:
• the time and space required to construct the data structure to be searched in
• the time (and sometimes an extra space) to answer queries.
For the case when the search space is allowed to vary, see "Dynamic problems".
Dynamic problems
Yet another major class is the dynamic problems, in which the goal is to find an efficient
algorithm for finding a solution repeatedly after each incremental modification of the input data
(addition or deletion input geometric elements). Algorithms for problems of this type typically
involve dynamic data structures. Any of the computational geometric problems may be converted
into a dynamic one, at the cost of increased processing time. For example, the range
searching problem may be converted into the dynamic range searching problem by providing for
addition and/or deletion of the points. The dynamic convex hull problem is to keep track of the
convex hull, e.g., for the dynamically changing set of points, i.e., while the input points are
inserted or deleted.
The computational complexity for this class of problems is estimated by:
• the time and space required to construct the data structure to be searched in
• the time and space to modify the searched data structure after an incremental change in the
search space
• the time (and sometimes an extra space) to answer a query.
Variations
Some problems may be treated as belonging to either of the categories, depending on the
context. For example, consider the following problem.