﻿ Geometric Tools: Source - Mathematics - Computational Geometry

## Mathematics: Computational Geometry

 Low-level queries for 2D and 3D points. In 2D, the queries involve determining where a point lives relative to a line (on one side, on the other side, oe exactly on the line); relative to a triangle (inside, outside, or exactly on an edge); or relative to the circumcircle of a triangle (inside, outside, or exactly on the circle). In 3D, the queries involve determining where a point lives relative to a plane (on one side, on the other side, or exactly on the plane); relative to a tetrahedron (inside, outside, or exactly on a face); or relative to the circumsphere of a tetrahedron (inside, outside, or exactly on the sphere). The data type of the query can be floating-point (float or double) or exact rational (BSNumber or BSRational). An abstract base class to support keys used in std::map where the key is an n-tuple (V[0],...,V[n-1]) of integers that index a collection of vertices. The feature key is ordered or unordered, where these terms refer to topological ordering of the components of the n-tuple. The paradigm is triangle face ordering, which can be clockwise or counterclockwise. An ordered feature key sets V[0] to the minimum of the n-tuple components and the n-tuple is a permutation of the components having an even number of transpositions. This preserves the topological ordering for the vertices. An unordered feature key has V[0] < ... < V[n-1], which might not preserve the topological ordering. Be aware that the term unordered is about topological order, not the sort ordering of the components as integers. perhaps A feature key for n = 2, which is used for std::map whose keys involve edges (2-tuples of integers). A feature key for n = 3, which is used for std::map whose keys involve triangles (3-tuples of integers). A feature key for n = 4, which is used for std::map whose keys involve tetrahedra (4-tuples of integers). A graph data structure involving vertices and edges. The mesh is a 1-dimensional manifold, where each vertex is shared by at most two edges. This is fancy way of representing polylines, open or closed. Its sole purpose is to motivate how one represents manifold meshes for 2-dimensional surfaces (triangle meshes) or 3-dimensional solids (tetrahedron meshes). A graph data structure involving edges and triangles. The mesh is a 2-dimensional manifold, where each edge is shared by at most two triangles. This is used extensively in the source code for algorithms in computational geometry. A graph data structure involving edges and triangles. The mesh is 2-dimensional but not necessarily manifold; each edge can be shared by more than two triangles A graph data structure involving vertices, edges, and triangles. The mesh is a 2-dimensional manifold, where each edge is shared by at most two triangles. This is used in the source code for algorithms in computational geometry; for example, see the VertexCollapseMesh code and the corresponding sample application that demonstrates its use. A graph data structure involving vertices, edges, and triangles. The mesh is 2-dimensional but not necessarily manifold; each edge can be shared by more than two triangles. A graph data structure involving triangles and tetrahedra. The mesh is a 3-dimensional manifold, where each triangle is shared by at most two tetrahedra. This is used extensively in the source code for algorithms in computational geometry. The 'T' stands for 'triangle' and the 'S' stands for 'simplex'; in 3D, a tetrahedron is a simplex. This code can be extended to n-dimensional manifolds involving (n-1)-dimensional simplices and n-dimensional simplices. Each (n-1)-dimensional simplex is shared by at most two n-dimensional simplices. Small helper classes to generate a set of unique vertices from a triangle soup or from a collection of indexed triangles. Convex hull in 2D or 3D. Delaunay triangulation in 2D, Delaunay tetrahedralization in 3D, and constrained Delaunay triangulation in 2D. The mesh classes provide some additional support that, currently, is used in the interpolation classes. Minimum-area box and minimum-area-circle containing a set of 2D points. Minimum-volume box and minimum-volume-sphere containing a set of 3D points. Separation of point sets in 2D or 3D. This is equivalent to computing the convex hulls of the sets and determining whether the hulls intersect (uses the method of separating axes). Nearest-neighbor queries using KD trees. Automatic texture coordinate generation for manifold triangle meshes with rectangle or disk topology. Manage a planar mesh and allow fast and exact point-in-triangle queries and computation of barycentric coordinates. This supports resampling of meshes with automatically generated texture coordinates. Triangulation via ear clipping of polygons, nested polygons, and trees of nested polygons. Triangulation via constrained Delaunay triangulation of polygons, nested polygons, and trees of nested polygons. An algorithm for computing cycle bases in planar graphs. The input must be a planar graph; the IsPlanarGraph file may be used to validate this assumption (using exact arithmetic). Create a tree of oriented bounding boxes for a set of 3D points. Boolean operations on intervals of the form [x0,x1) and on rectangles of the form [x0,x1) x [y0,y1). Conformal mapping between surfaces of genus 0. Discrete differential geometry to estimate principal curvatures and directions at vertices of a triangle mesh.