Geometry processing

Last updated
Polygon Mesh Processing by Mario Botsch et al. is a textbook on the topic of Geometry Processing. Polygon Mesh Processing Book Cover.jpg
Polygon Mesh Processing by Mario Botsch et al. is a textbook on the topic of 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, reconstruction, analysis, manipulation, simulation and transmission of complex 3D models. As the name implies, many of the concepts, data structures, and algorithms are directly analogous to signal processing and image processing. For example, where image smoothing might convolve an intensity signal with a blur kernel formed using the Laplace operator, geometric smoothing might be achieved by convolving a surface geometry with a blur kernel formed using the Laplace-Beltrami operator.

Contents

Applications of geometry processing algorithms already cover a wide range of areas from multimedia, entertainment and classical computer-aided design, to biomedical computing, reverse engineering, and scientific computing. [1]

Geometry processing is a common research topic at SIGGRAPH, the premier computer graphics academic conference, and the main topic of the annual Symposium on Geometry Processing.

Geometry processing as a life cycle

A mesh of a cactus showing the Gaussian Curvature at each vertex, using the angle defect method. Cactus Gaussian Curvature.png
A mesh of a cactus showing the Gaussian Curvature at each vertex, using the angle defect method.

Geometry processing involves working with a shape, usually in 2D or 3D, although the shape can live in a space of arbitrary dimensions. The processing of a shape involves three stages, which is known as its life cycle. At its "birth," a shape can be instantiated through one of three methods: a model, a mathematical representation, or a scan. After a shape is born, it can be analyzed and edited repeatedly in a cycle. This usually involves acquiring different measurements, such as the distances between the points of the shape, the smoothness of the shape, or its Euler characteristic. Editing may involve denoising, deforming, or performing rigid transformations. At the final stage of the shape's "life," it is consumed. This can mean it is consumed by a viewer as a rendered asset in a game or movie, for instance. The end of a shape's life can also be defined by a decision about the shape, like whether or not it satisfies some criteria. Or it can even be fabricated in the real world, through a method such as 3D printing or laser cutting.

Discrete Representation of a Shape

Like any other shape, the shapes used in geometry processing have properties pertaining to their geometry and topology. The geometry of a shape concerns the position of the shape's points in space, tangents, normals, and curvature. It also includes the dimension in which the shape lives (ex. or ). The topology of a shape is a collection of properties that do not change even after smooth transformations have been applied to the shape. It concerns dimensions such as the number of holes and boundaries, as well as the orientability of the shape. One example of a non-orientable shape is the Mobius strip.

In computers, everything must be discretized. Shapes in geometry processing are usually represented as triangle meshes, which can be seen as a graph. Each node in the graph is a vertex (usually in ), which has a position. This encodes the geometry of the shape. Directed edges connect these vertices into triangles, which by the right hand rule, then have a direction called the normal. Each triangle forms a face of the mesh. These are combinatoric in nature and encode the topology of the shape. In addition to triangles, a more general class of polygon meshes can also be used to represent a shape. More advanced representations like progressive meshes encode a coarse representation along with a sequence of transformations, which produce a fine or high resolution representation of the shape once applied. These meshes are useful in a variety of applications, including geomorphs, progressive transmission, mesh compression, and selective refinement. [2]

A mesh of the famous Stanford bunny. Shapes are usually represented as a mesh, a collection of polygons that delineate the contours of the shape. Mesh bunny.png
A mesh of the famous Stanford bunny. Shapes are usually represented as a mesh, a collection of polygons that delineate the contours of the shape.

Properties of a shape

Euler Characteristic

One particularly important property of a 3D shape is its Euler characteristic, which can alternatively be defined in terms of its genus. The formula for this in the continuous sense is , where is the number of connected components, is number of holes (as in donut holes, see torus), and is the number of connected components of the boundary of the surface. A concrete example of this is a mesh of a pair of pants. There is one connected component, 0 holes, and 3 connected components of the boundary (the waist and two leg holes). So in this case, the Euler characteristic is -1. To bring this into the discrete world, the Euler characteristic of a mesh is computed in terms of its vertices, edges, and faces. .

This image shows a mesh of a pair of pants, with Euler characteristic -1. This is explained by the equation to compute the characteristic: 2c - 2h - b. The mesh has 1 connected component, 0 topological holes, and 3 boundaries (the waist hole and each leg hole): 2 - 0 - 3 = -1. Pants mesh.png
This image shows a mesh of a pair of pants, with Euler characteristic -1. This is explained by the equation to compute the characteristic: 2c - 2h - b. The mesh has 1 connected component, 0 topological holes, and 3 boundaries (the waist hole and each leg hole): 2 - 0 - 3 = -1.

Surface reconstruction

Poisson reconstruction from surface points to mesh

A triangle mesh is constructed out of a point cloud. Sometimes shapes are initialized only as "point clouds," a collection of sampled points from the shape's surface. Often, these point clouds need to be converted to meshes. Mesh reconstruction.gif
A triangle mesh is constructed out of a point cloud. Sometimes shapes are initialized only as "point clouds," a collection of sampled points from the shape's surface. Often, these point clouds need to be converted to meshes.

Depending on how a shape is initialized or "birthed," the shape might exist only as a nebula of sampled points that represent its surface in space. To transform the surface points into a mesh, the Poisson reconstruction [3] strategy can be employed. This method states that the indicator function, a function that determines which points in space belong to the surface of the shape, can actually be computed from the sampled points. The key concept is that gradient of the indicator function is 0 everywhere, except at the sampled points, where it is equal to the inward surface normal. More formally, suppose the collection of sampled points from the surface is denoted by , each point in the space by , and the corresponding normal at that point by . Then the gradient of the indicator function is defined as:

The task of reconstruction then becomes a variational problem. To find the indicator function of the surface, we must find a function such that is minimized, where is the vector field defined by the samples. As a variational problem, one can view the minimizer as a solution of Poisson's equation. [3] After obtaining a good approximation for and a value for which the points with lie on the surface to be reconstructed, the marching cubes algorithm can be used to construct a triangle mesh from the function , which can then be applied in subsequent computer graphics applications.

Registration

Point-to-point-registration.gif
An animation depicting registration of a partial mesh onto a complete mesh, with piecewise constant approximation of the projection function.
Point-to-Plane Registration.gif
An animation depicting the same registration procedure as above, but with piecewise linear approximation of the projection function. Note that it converges much faster.

One common problem encountered in geometry processing is how to merge multiple views of a single object captured from different angles or positions. This problem is known as registration. In registration, we wish to find an optimal rigid transformation that will align surface with surface . More formally, if is the projection of a point x from surface onto surface , we want to find the optimal rotation matrix and translation vector that minimize the following objective function:

While rotations are non-linear in general, small rotations can be linearized as skew-symmetric matrices. Moreover, the distance function is non-linear, but is amenable to linear approximations if the change in is small. An iterative solution such as Iterative Closest Point (ICP) is therefore employed to solve for small transformations iteratively, instead of solving for the potentially large transformation in one go. In ICP, n random sample points from are chosen and projected onto . In order to sample points uniformly at random across the surface of the triangle mesh, the random sampling is broken into two stages: uniformly sampling points within a triangle; and non-uniformly sampling triangles, such that each triangle's associated probability is proportional to its surface area. [4] Thereafter, the optimal transformation is calculated based on the difference between each and its projection. In the following iteration, the projections are calculated based on the result of applying the previous transformation on the samples. The process is repeated until convergence.

Smoothing

When shapes are defined or scanned, there may be accompanying noise, either to a signal acting upon the surface or to the actual surface geometry. Reducing noise on the former is known as data denoising, while noise reduction on the latter is known as surface fairing. The task of geometric smoothing is analogous to signal noise reduction, and consequently employs similar approaches.

The pertinent Lagrangian to be minimized is derived by recording the conformity to the initial signal and the smoothness of the resulting signal, which approximated by the magnitude of the gradient with a weight :

.

Taking a variation on emits the necessary condition

.

By discretizing this onto piecewise-constant elements with our signal on the vertices we obtain

A noisy sphere being iteratively smoothed. Noisy sphere.gif
A noisy sphere being iteratively smoothed.

where our choice of is chosen to be for the cotangent Laplacian and the term is to map the image of the Laplacian from areas to points. Because the variation is free, this results in a self-adjoint linear problem to solve with a parameter : When working with triangle meshes one way to determine the values of the Laplacian matrix is through analyzing the geometry of connected triangles on the mesh.

Where and are the angles opposite the edge [5] The mass matrix M as an operator computes the local integral of a function's value and is often set for a mesh with m triangles as follows:

Parameterization

Occasionally, we need to flatten a 3D surface onto a flat plane. This process is known as parameterization. The goal is to find coordinates u and v onto which we can map the surface so that distortions are minimized. In this manner, parameterization can be seen as an optimization problem. One of the major applications of mesh parameterization is texture mapping.

Mass springs method

The Tutte Embedding shows non-smooth parameterizations on the side of the beetle. Tutte Embedding on Beetle.gif
The Tutte Embedding shows non-smooth parameterizations on the side of the beetle.

One way to measure the distortion accrued in the mapping process is to measure how much the length of the edges on the 2D mapping differs from their lengths in the original 3D surface. In more formal terms, the objective function can be written as:

Where is the set of mesh edges and is the set of vertices. However, optimizing this objective function would result in a solution that maps all of the vertices to a single vertex in the uv-coordinates. Borrowing an idea from graph theory, we apply the Tutte Mapping and restrict the boundary vertices of the mesh onto a unit circle or other convex polygon. Doing so prevents the vertices from collapsing into a single vertex when the mapping is applied. The non-boundary vertices are then positioned at the barycentric interpolation of their neighbours. The Tutte Mapping, however, still suffers from severe distortions as it attempts to make the edge lengths equal, and hence does not correctly account for the triangle sizes on the actual surface mesh.

Least-squares conformal mappings

A comparison of the Tutte Embedding and Least-Squares-Conformal-Mapping parameterization. Notice how the LSCM parameterization is smooth on the side of the beetle. Tutte Vs LSCM .gif
A comparison of the Tutte Embedding and Least-Squares-Conformal-Mapping parameterization. Notice how the LSCM parameterization is smooth on the side of the beetle.

Another way to measure the distortion is to consider the variations on the u and v coordinate functions. The wobbliness and distortion apparent in the mass springs methods are due to high variations in the u and v coordinate functions. With this approach, the objective function becomes the Dirichlet energy on u and v:

There are a few other things to consider. We would like to minimize the angle distortion to preserve orthogonality. That means we would like . In addition, we would also like the mapping to have proportionally similar sized regions as the original. This results to setting the Jacobian of the u and v coordinate functions to 1.

Putting these requirements together, we can augment the Dirichlet energy so that our objective function becomes: [6] [7]

To avoid the problem of having all the vertices mapped to a single point, we also require that the solution to the optimization problem must have a non-zero norm and that it is orthogonal to the trivial solution.

Deformation

An example of as-rigid-as-possible deformation. Asrigidaspossible-man.gif
An example of as-rigid-as-possible deformation.

Deformation is concerned with transforming some rest shape to a new shape. Typically, these transformations are continuous and do not alter the topology of the shape. Modern mesh-based shape deformation methods satisfy user deformation constraints at handles (selected vertices or regions on the mesh) and propagate these handle deformations to the rest of shape smoothly and without removing or distorting details. Some common forms of interactive deformations are point-based, skeleton-based, and cage-based. [8] In point-based deformation, a user can apply transformations to small set of points, called handles, on the shape. Skeleton-based deformation defines a skeleton for the shape, which allows a user to move the bones and rotate the joints. Cage-based deformation requires a cage to be drawn around all or part of a shape so that, when the user manipulates points on the cage, the volume it encloses changes accordingly.

Point-based deformation

Handles provide a sparse set of constraints for the deformation: as the user moves one point, the others must stay in place.

A rest surface immersed in can be described with a mapping , where is a 2D parametric domain. The same can be done with another mapping for the transformed surface . Ideally, the transformed shape adds as little distortion as possible to the original. One way to model this distortion is in terms of displacements with a Laplacian-based energy. [9] Applying the Laplace operator to these mappings allows us to measure how the position of a point changes relative to its neighborhood, which keeps the handles smooth. Thus, the energy we would like to minimize can be written as:

.

While this method is translation invariant, it is unable to account for rotations. The As-Rigid-As-Possible deformation scheme [10] applies a rigid transformation to each handle i, where is a rotation matrix and is a translation vector. Unfortunately, there's no way to know the rotations in advance, so instead we pick a “best” rotation that minimizes displacements. To achieve local rotation invariance, however, requires a function which outputs the best rotation for every point on the surface. The resulting energy, then, must optimize over both and :

Note that the translation vector is not present in the final objective function because translations have constant gradient.

Inside-Outside Segmentation

While seemingly trivial, in many cases, determining the inside from the outside of a triangle mesh is not an easy problem. In general, given a surface we pose this problem as determining a function which will return if the point is inside , and otherwise.

In the simplest case, the shape is closed. In this case, to determine if a point is inside or outside the surface, we can cast a ray in any direction from a query point, and count the number of times it passes through the surface. If was outside then the ray must either not pass through (in which case ) or, each time it enters it must pass through twice, because S is bounded, so any ray entering it must exit. So if is outside, is even. Likewise if is inside, the same logic applies to the previous case, but the ray must intersect one extra time for the first time it leaves . So:

Now, oftentimes we cannot guarantee that the is closed. Take the pair of pants example from the top of this article. This mesh clearly has a semantic inside-and-outside, despite there being holes at the waist and the legs.

Approximating inside-outside segmentation by shooting rays from a query point for varying number of rays. Point shooting.gif
Approximating inside-outside segmentation by shooting rays from a query point for varying number of rays.

The naive attempt to solve this problem is to shoot many rays in random directions, and classify as being inside if and only if most of the rays intersected an odd number of times. To quantify this, let us say we cast rays, . We associate a number which is the average value of from each ray. Therefore:

In the limit of shooting many, many rays, this method handles open meshes, however it in order to become accurate, far too many rays are required for this method to be computationally ideal. Instead, a more robust approach is the Generalized Winding Number. [11] Inspired by the 2D winding number, this approach uses the solid angle at of each triangle in the mesh to determine if is inside or outside. The value of the Generalized Winding Number at , is proportional to the sum of the solid angle contribution from each triangle in the mesh:

For a closed mesh, is equivalent to the characteristic function for the volume represented by . Therefore, we say:

Because is a harmonic function, it degrades gracefully, meaning the inside-outside segmentation would not change much if we poked holes in a closed mesh. For this reason, the Generalized Winding Number handles open meshes robustly. The boundary between inside and outside smoothly passes over holes in the mesh. In fact, in the limit, the Generalized Winding Number is equivalent to the ray-casting method as the number of rays goes to infinity.

Applications

See also

Related Research Articles

<span class="mw-page-title-main">Area</span> Size of a two-dimensional surface

Area is the measure of a region's size on a surface. The area of a plane region or plane area refers to the area of a shape or planar lamina, while surface area refers to the area of an open surface or the boundary of a three-dimensional object. Area can be understood as the amount of material with a given thickness that would be necessary to fashion a model of the shape, or the amount of paint necessary to cover the surface with a single coat. It is the two-dimensional analogue of the length of a curve or the volume of a solid . Two different regions may have the same area ; by synecdoche, "area" sometimes is used to refer to the region, as in a "polygonal area".

Continuum mechanics is a branch of mechanics that deals with the deformation of and transmission of forces through materials modeled as a continuous medium rather than as discrete particles. The French mathematician Augustin-Louis Cauchy was the first to formulate such models in the 19th century.

In quantum chemistry and molecular physics, the Born–Oppenheimer (BO) approximation is the best-known mathematical approximation in molecular dynamics. Specifically, it is the assumption that the wave functions of atomic nuclei and electrons in a molecule can be treated separately, based on the fact that the nuclei are much heavier than the electrons. Due to the larger relative mass of a nucleus compared to an electron, the coordinates of the nuclei in a system are approximated as fixed, while the coordinates of the electrons are dynamic. The approach is named after Max Born and his 23-year-old graduate student J. Robert Oppenheimer, the latter of whom proposed it in 1927 during a period of intense ferment in the development of quantum mechanics.

In vector calculus, the divergence theorem, also known as Gauss's theorem or Ostrogradsky's theorem, is a theorem relating the flux of a vector field through a closed surface to the divergence of the field in the volume enclosed.

<span class="mw-page-title-main">Shape</span> Form of an object or its external boundary

A shape is a graphical representation of an object's form or its external boundary, outline, or external surface; it is distinct from other object properties, such as color, texture, or material type. In geometry, shape excludes information about the object's location, scale, orientation and reflection. A figure is a representation including both shape and size.

<span class="mw-page-title-main">Normal (geometry)</span> Line or vector perpendicular to a curve or a surface

In geometry, a normal is an object that is perpendicular to a given object. For example, the normal line to a plane curve at a given point is the line perpendicular to the tangent line to the curve at the point.

<span class="mw-page-title-main">Gaussian curvature</span> Product of the principal curvatures of a surface

In differential geometry, the Gaussian curvature or Gauss curvatureΚ of a smooth surface in three-dimensional space at a point is the product of the principal curvatures, κ1 and κ2, at the given point:

In mathematics, the covariant derivative is a way of specifying a derivative along tangent vectors of a manifold. Alternatively, the covariant derivative is a way of introducing and working with a connection on a manifold by means of a differential operator, to be contrasted with the approach given by a principal connection on the frame bundle – see affine connection. In the special case of a manifold isometrically embedded into a higher-dimensional Euclidean space, the covariant derivative can be viewed as the orthogonal projection of the Euclidean directional derivative onto the manifold's tangent space. In this case the Euclidean derivative is broken into two parts, the extrinsic normal component and the intrinsic covariant derivative component.

In mathematics, the discrete Laplace operator is an analog of the continuous Laplace operator, defined so that it has meaning on a graph or a discrete grid. For the case of a finite-dimensional graph, the discrete Laplace operator is more commonly called the Laplacian matrix.

In differential geometry, the Laplace–Beltrami operator is a generalization of the Laplace operator to functions defined on submanifolds in Euclidean space and, even more generally, on Riemannian and pseudo-Riemannian manifolds. It is named after Pierre-Simon Laplace and Eugenio Beltrami.

<span class="mw-page-title-main">Caustic (optics)</span> Envelope of light rays reflected or refracted by a curved surface/object

In optics, a caustic or caustic network is the envelope of light rays which have been reflected or refracted by a curved surface or object, or the projection of that envelope of rays on another surface. The caustic is a curve or surface to which each of the light rays is tangent, defining a boundary of an envelope of rays as a curve of concentrated light. Therefore, in the photo to the right, caustics can be seen as patches of light or their bright edges. These shapes often have cusp singularities.

An eikonal equation is a non-linear first-order partial differential equation that is encountered in problems of wave propagation.

<span class="mw-page-title-main">Finite element method</span> Numerical method for solving physical or engineering problems

The finite element method (FEM) is a popular method for numerically solving differential equations arising in engineering and mathematical modeling. Typical problem areas of interest include the traditional fields of structural analysis, heat transfer, fluid flow, mass transport, and electromagnetic potential.

In mathematics, the Riemannian connection on a surface or Riemannian 2-manifold refers to several intrinsic geometric structures discovered by Tullio Levi-Civita, Élie Cartan and Hermann Weyl in the early part of the twentieth century: parallel transport, covariant derivative and connection form. These concepts were put in their current form with principal bundles only in the 1950s. The classical nineteenth century approach to the differential geometry of surfaces, due in large part to Carl Friedrich Gauss, has been reworked in this modern framework, which provides the natural setting for the classical theory of the moving frame as well as the Riemannian geometry of higher-dimensional Riemannian manifolds. This account is intended as an introduction to the theory of connections.

In continuum mechanics, a compatible deformation tensor field in a body is that unique tensor field that is obtained when the body is subjected to a continuous, single-valued, displacement field. Compatibility is the study of the conditions under which such a displacement field can be guaranteed. Compatibility conditions are particular cases of integrability conditions and were first derived for linear elasticity by Barré de Saint-Venant in 1864 and proved rigorously by Beltrami in 1886.

<span class="mw-page-title-main">Calculus of moving surfaces</span> Extension of the classical tensor calculus

The calculus of moving surfaces (CMS) is an extension of the classical tensor calculus to deforming manifolds. Central to the CMS is the Tensorial Time Derivative whose original definition was put forth by Jacques Hadamard. It plays the role analogous to that of the covariant derivative on differential manifolds in that it produces a tensor when applied to a tensor.

In mathematics, the Kodaira–Spencer map, introduced by Kunihiko Kodaira and Donald C. Spencer, is a map associated to a deformation of a scheme or complex manifold X, taking a tangent space of a point of the deformation space to the first cohomology group of the sheaf of vector fields on X.

In graph drawing and geometric graph theory, a Tutte embedding or barycentric embedding of a simple, 3-vertex-connected, planar graph is a crossing-free straight-line embedding with the properties that the outer face is a convex polygon and that each interior vertex is at the average of its neighbors' positions. If the outer polygon is fixed, this condition on the interior vertices determines their position uniquely as the solution to a system of linear equations. Solving the equations geometrically produces a planar embedding. Tutte's spring theorem, proven by W. T. Tutte, states that this unique solution is always crossing-free, and more strongly that every face of the resulting planar embedding is convex. It is called the spring theorem because such an embedding can be found as the equilibrium position for a system of springs representing the edges of the graph.

<span class="mw-page-title-main">Objective stress rate</span>

In continuum mechanics, objective stress rates are time derivatives of stress that do not depend on the frame of reference. Many constitutive equations are designed in the form of a relation between a stress-rate and a strain-rate. The mechanical response of a material should not depend on the frame of reference. In other words, material constitutive equations should be frame-indifferent (objective). If the stress and strain measures are material quantities then objectivity is automatically satisfied. However, if the quantities are spatial, then the objectivity of the stress-rate is not guaranteed even if the strain-rate is objective.

In mathematics, calculus on Euclidean space is a generalization of calculus of functions in one or several variables to calculus of functions on Euclidean space as well as a finite-dimensional real vector space. This calculus is also known as advanced calculus, especially in the United States. It is similar to multivariable calculus but is somewhat more sophisticated in that it uses linear algebra more extensively and covers some concepts from differential geometry such as differential forms and Stokes' formula in terms of differential forms. This extensive use of linear algebra also allows a natural generalization of multivariable calculus to calculus on Banach spaces or topological vector spaces.

References

  1. 1 2 Botsch, Mario; Kobbelt, Leif; Pauly, Mark; Alliez, Pierre (2010). Polygon Mesh Processing. CRC Press. ISBN   9781568814261.
  2. Hugues Hoppe. "Progressive Meshes" (PDF).
  3. 1 2 "Poisson surface reconstruction". hhoppe.com. Retrieved 2017-01-26.
  4. Szymon Rusinkiewicz, Marc Levoy. "Efficient Variants of the ICP Algorithm" (PDF).
  5. "Chris Tralie : Laplacian Meshes". www.ctralie.com. Retrieved 2017-03-16.
  6. Desbrun, Mathieu (2002). "Intrinsic Parameterizations of Surface Meshes" (PDF). Eurographics. 21.
  7. Levy, Bruno (2002). "Least squares conformal maps for automatic texture atlas generation" (PDF). ACM Transactions on Graphics. 21 (3): 362–371. doi:10.1145/566654.566590.
  8. Jacobson, Alec; Baran, Ilya; Popović, Jovan; Sorkine, Olga (2011). "Bounded Biharmonic Weights for Real-Time Deformation" (PDF). ACM Transactions on Graphics. 30 (4): 1. doi:10.1145/2010324.1964973.
  9. Marc, Alexa (2003). "Differential coordinates for local mesh morphing and deformation". The Visual Computer. 19 (2): 105–114. doi:10.1007/s00371-002-0180-0. S2CID   6847571.
  10. Sorkine, Olga; Alexa, Marc (2007). "As-Rigid-As-Possible Surface Modeling" (PDF). Proceedings of EUROGRAPHICS/ACM SIGGRAPH Symposium on Geometry Processing: 109–116.
  11. Jacobson, Alec; Ladislav, Kavan; Sorkine-Hornung, Olga (2013). "Robust Inside-Outside Segmentation using Generalized Winding Numbers" (PDF). ACM Transactions on Graphics. 32 (4): 1. doi:10.1145/2461912.2461916. S2CID   207202533.