Modeling is a major theme in all of the sciences. Examples include modeling the weather pattern over a geographic region or combustion inside a jet engine. In many examples, the models will have a significant geometric character (for instance, the topography of the region or the interior chambers of the jet engine). In this chapter, we focus in those physical models that are ``purely geometric''. Such models are commonly encountered in engineering and architecture: computer-aided design (CAD); computer-aided manufacturing (CAM); automobile, ship or aircraft design; robotics; virtual reality systems; and electronic prototyping. Geometric models are needed in the computational sciences for simulations, computational fluid dynamics, etc. The subject usually called geometric design or solid modeling. addresses the problems of representing, manipulating and visualizing such models. Representation issues requires topological tools, while the manipulation of nonlinear representations requires numerical and algebraic computation. Visualization implies that this subject is intimately related to computer graphics. Two references are the books by Martti Mäntylä's [2] and Chris Hoffmann [1].
The models we address are typically 3-dimensional solids. We may define a solid to be closed subset of R3. This is too general as real solids has many other additional properties. The prototypical solid is the convex polytope. More generally, we have the general polyhedron which is just a finite union of convex polytopes There are four basic approaches to solid modeling:
Perhaps a fifth approach is the representation of solids by planar, sectional and perspective views. This is the traditional drafting approach, but we decline to call a collection of such views a model of the solid. We can also combine the above approaches - for instance, a CSG system might also maintain the surface representation.
In considering the relative merits of the first three approaches above, it might appear that the first two approaches are superior to the boundary representations since they directly model the interior of the solid. Indeed, for a class of applications where the interior of the solid is critical (e.g., modeling soft tissues of the brain, or the atmosphere), a surface representation is worthless.
Visualization is a critical part of the modeling function. Indeed, visualization is sometimes the sole object of the modeling. There are two basic kinds of objects in visualization: opaque versus translucent. For the former, a direct representation of the solid surface is more useful (e.g., it is hard to visualize an opaque solid directly from its CSG representation). Traditional computer graphics has developed many tools for this problem. To visualize translucent objects, we need the tools of volume graphics. This is an increasingly important form of visualization. However, our main interest here is opaque solids.
The solid representation to modeling (via spatial decomposition or CSG) has the advantage of being unambigous. Perhaps the most important advantage is this: a single CSG expression can represent an entire parametrized family of solids. For instance, we can parametrize the position of a subsolid by the amount of its translation. See figure 1 which shows the picture of a bracket, but this is supposed to be only one possibility of a parametrized family. Unfortunately, it is easy to generate undesirable and unexpected models in the parametrized family (see the next item below).
Nice Representations. A representation system must maintain a balance among several desirable properties, including efficiency (e.g., wire frames), modeling power (e.g., spatial representation can represent internal properties of solids), and flexibility (e.g., parametrized models in CSG). Over flexible or over powerful representations may allow us to represent objects that are not ``nice''. This is an informal notion, but here are some examples of such objects.
FIGURE of IMPOSSIBLE OBJECT (Mantyla)
FIGURE OF AMBIGUIOUS OBJECT
User Level Issues. What is a feature? Parametrized features are even harder to understand: When is a ``corner'' no longer a corner? E.g., A ``slot'' in a square black is moved to the boundary; is it still a slot? How can we introduce constraints into the system? We are interested in design by functionality.
Some Algorithmic Issues.
Generally, robustness and efficiency is an issue.
The following are some basic problems:
Compute the intersection of 2 solids;
Given two intersecting surfaces, find a blending surface;
Given a point and a surface, does the point lie on the surface?
Compute the envelop of sweeping an piecewise algebraic curve
along a space curve.
Beyond Geometry. Although we focus on geometric issues only, there will be other demands on a geometric modeler in the real world. Issues such as manufacturability, mechanical properties, etc, may have to be answered from the model.
Before we consider a 3-dimensional modeling system, it is instructive to consider a simple 2-dimensional system. It will serve to expose some of the basic issues of any geometric modeler. Even in a 2-dimensional system, we can introduce advanced features that are beyond the capabilities of most current modelers. For instance, we can introduce physical attributes such as mass, friction and dynamics into our model.
Geometric Objects. Geometric objects are classified as primitive or nonprimitive. The distinction is purely based on their representational size: primitive objects have constant size, and non-primitive ones have unbounded size. Primitive objects include (real) numbers, points, generalized line segments and triangles. By generalized line segments, we mean both finite line segments as well as lines and rays. Nonprimitive objects include polylines, polygons (simple or otherwise) and plane graphs. The special value is considered an instance of any of these objects.
It is useful to introduce nonstandard real numbers (these can be infinitely large or infinitely close to an actual real number). We use w for the infinitely large number and e for the infinitely small number, where w = 1/e. Thus nonstandard numbers are just elements of the function field R(w). Henceforth, numbers refers to elements of R(w). Numbers in the set R is called standard and otherwise nonstandard.
We represent a point P as a pair (x,y) of numbers or as a non-zero triple (x,y,w) in homogeneous coordinates (with w as the homogenizing coordinate). The advantages of the latter is that any affine transformation (in particular, translation, rotation and scaling) can be written as a matrix multiplication. A point with nonstandard numbers as coordinates is called a nonstandard point. Similarly for nonstandard segments, etc.
For simplicity, generalized line segments are simply called segments. A segment can be represented by a pair of non-standard points. A segment is classified as finite if it has two finite endpoints, and infinite otherwise. A triangle can be represented by a triple of points. A polyline is a finite sequence of points, with an associated sequence of edges connecting successive points. A polygon can be represented by a polyline with the implicit rule that the last point is connected to the first by an edge. A plane graph is represented by a planar graph G together with coordinates for each of its vertices.
We will adopt the object-oriented programming language terminology and call points, segments, etc, as (object) classes. Individual elements of these classes are called instances or members. Special functions that create members are called constructors. Let us give some simple examples of the constructors.
Object | Constructor | Example | Remarks |
Number | Number(Expression) | A = Number(1.2 + 3/4), | Expression can be null |
B = Number(sqrt(2)) | or Omega or Epsilon. | ||
Point | Point(Number, Number) | P = Point(2, 0), Q = Point(1,1) | |
Segment | Segment(Point, Point), | Segment(P, Q), | |
Segment(Point, Point, type) | Segment(P, Point(0,1), ray) | type=ray or line | |
Triangle | Triangle(Point, Point, Point) | Triangle(P, Q, R) |
Attributed Objects. As a design decision, we will try not to proliferate the class of objects. Let us illustrate this: for instance, segments can be given an orientation. Instead of saying that oriented and unoriented segments are two classes of objects, we say they are the same class of objects but with different orientation attributes. Similarly, polygons can be oriented or not.
In order to make the system as flexible as possible, we allow object to have as many or as few attributes as it wishes. It is nonobvious in our ``attributed design'' is that we intend to make the coordinates x,y of point, or the equation aX+bY+c = 0 of a line to be attributes as well! Consider the alternative (which is quite reasonable): suppose we require that certain defining attributes for a particular class of objects to always have a value. For instance, we may insist that the coordinates of a point is always defined. Unfortunately, there are situations where even this is undesirable! Hence, we give up trying to impose any requirements. In any case, the possibility of null values means that the enforcement of defining attributes may be meaningless (or hard to achieve).
What are attributes? (1) Each attribute has a unique name (e.g. ``orientation'', ``x-coordinate'', ``color''). (2) Each attribute has a value type (e.g., string value, number value, point class) (3) There might be dependencies among certain attributes: for instance, a line may have two points that lie on the line as attributes, but it may also have a line equation attribute. These are not independent.
What are the attributes of interest? Perhaps the most important attributes are display attributes: we can attach visibility or transparency coefficients and texture maps to each object. These attributes will be used by display functions. Objects such as points and lines can have size attributes. Another useful attribute is label and name. Both of these are string values, but names must be unique among objects of the same class.
When we consider physical modeling, we can introduce more attributes such as mass, velocity, acceleration, coefficient of friction, etc. Edges may have spring constants, etc.
Predicates and Operators. Operators are functions on geometric objects. For instance, we have an operator for computing the distance between a point and another geometric object.
Predicates are those operators whose result is a Boolean value. For instance, we may want to check if a triangle is degenerate, that is, its three vertices are collinear. We may have the intersection operator that takes two line segments and define their intersection which is a point, possibly null.
Thus constructors above are just a very special kind of operator. A general operator is the copy operator, which recreates an unshared copy of an object.
Grouping. A collection of geometric objects forms a grouping. A grouping can have a transform attribute, which is a general affine transformation. It can also have visibility attributes, which is independent of the visibility attributes of the individual objects in the grouping.
Parametric Grouping and Constraints. A grouping can have parameters which are number variables. Each parameter may be given a number as its value. Objects in the grouping may use these parameters in place of numbers. E.g., a scaling parameter allows us to change the size of all the objects in a grouping.
Constraints are special attributes associated to a grouping, and is only possible when we have parameters. Examples of constraints:
In an initial implementation, we will dispense with this generality, but only have very simple constraints: equality or inequality among parameters. As a next step up, we may introduce linear constraints.
Ruler and Compass Constructions and Theorems We illustrate the use of the constraint system in the design of a ruler-and-compass constructor system.
2+e-dimensional System.
Examples: suppose we want to represent a polygonal knot. Then we want each intersection of line segments to have a specified äbove/below'' relationship. We call this a (2+e)-dimensional system.
Physical Mechanisms.
rigid rods, springs, strings, etc
Pseudo-triangles and rigidity
Cinderella system
Dynamic Systems and Animation. How do we construct animated mechanisms?
Design and program a system in which the user can construct the above
A CSG model is basically a system to construct an expression that represents a solid object. Let us briefly look at a ``core'' CSG model, that has primitive solids, affine transformations and regularized Boolean operations. Figure illustrates a core CSG tree that represents a bracket.
A CSG tree representing a Bracketbracketxp
The leaves of an expression are populated by primitive solids. Typical primitive solids are:
half-spaces, cube, prisms, sphere, cylinder, cone, torus.
The simplest affine operators are translation, scaling and rotation. But more generally, we can descibe them by a non-singular transformation matrix. Thus, we may write ``transform(S, scale(x,3))'' to change the scale in the x-direction by a factor of 3. They allow us to create important variations of the primitive solids. Using scaling, we can transform a cube into any rectangular block. Alternatively, we may want to introduce the ``block primitive'': block(1,3,4) instead of saying ``transform(transform(cube(1), scale(y,3)), scale(z,4))''.
Regularized Boolean Operations. The regularized Boolean operations are variations on the set-theoretic Boolean operations of union, intersection and complement:
|
Interrogation We want to interrogate the CSG object. Most basic is: is a given point p on/in/out of an object? Called the point/solid classification problem. We outline the basic algorithm in the context of a core CSG system. We begin at the root of the expression.
È* | in | on | out |
in | in | in | in |
on | in | on/in | on |
out | in | on | out |
Ç* | in | on | out |
in | in | on | out |
on | on | on/out | out |
out | out | out | out |
[It is not hard to do complement operation.] The question is how to resolve the middle entry? E.g. consider two identical boxes A, B with A stacked on top of B. Let p be a point in the middle of the top face of B. Then p is on A and on B. But p is in AÈ* B and out of AÇ* B. We cannot decide this except by a ``neighborhood analysis''.
We do as suggested by Hoffmann (note: we only work with polyhedral neighborhoods).
Let us illustrate this for one case: suppose p is
on a face of A and a face of B and we want to classify
a point relative to AÈ* B. Then:
(a) If the 2 faces are NOT coplanar, then p is
ON the union of A and B.
(b) If the two faces are coplanar, then if the outward normals are equal then p is ON the union of A, B, else, it is IN.
Extensions. The above ``core CSG'' system can be extended in various ways. For instance, we need not assume that the nodes of a CSG expression represent solids - it is useful to introduce nonsolids (geometric objects of dimensions 0, 1 or 2), and other operations that can create solids out of them. For instance, if we have a planar polygon, we can sweep it along a finite trajectory to generate a cylider/prism like object.
The theory of 2-manifolds is very well-understood, and fairly intuitive. This can be found in any introductory book on algebraic topology. The computational aspects of this theory is addressed more recently. E.g., [3,,].
A k-manifold (without boundary) is a topological space that is locally homeomorphic to an open k-dimensional ball. We are interested in the case k = 2, so the k-dimensional ball is an open disk. Also, we simply say ``manifold'' to mean 2-manifold.
For instance, the surface of a three-dimensional ball is a manifold with boundary, usually called the 2-sphere and denoted S2. Another interesting manifold without boundary is the torus, denoted T2. However, the theory also non-orientable mobius strip, torus, Klein bottle
[BACKGROUND: topological space]
Classification of 2-manifolds: orientable/non-orientable.
NOTE: An oriented a planar polygon is a polygon together with an arbitrary orientation (cw or ccw). Each edge of the polygon has an induced direction. The induced direction is said to be positive with respect to the orientation of the polygon; the other is said to be negative
Polygonal or Plane Model of 2-manifolds:
a collection of oriented disjoint polygon
with a total of 2n
edges, labeled with the symbols ai (i = 1 ,¼, n)
where each ai appears exactly twice and each
appearance is associated with an arbitrary sign ±.
The signs give each edge a direction (positive if the label is positive, negative else) with respect to the orientation of its polygon. We form a 2-manifold by identifying each pair of directed edges with the same label (ignoring their signs).
NOTE: it is easy to see that we can reduce to just one polygon. In the case of one polygon, we need not orient the polygon since the fundamental properties of the surface is unchanged if we flip every sign.
Möbius' Rule: the manifold is orientable iff such that for each pair of identified edges, one edge occurs is positive and the other is negative.
EXAMPLES:
(a) Torus: a b [`a] [`b]
(b) Klein bottle: a a
Brahana-Dehn-Heegaard Classification: Every 2-manifold is topologically equivalent to one of the following:
|
E.g., we can eliminate the pair a[`a] in any sequence ¼a [`a]¼.
Euler-Poincaré Formula: for an orientable solid (??)
|
E.g., for a donut, s = 1, h = 1.
E.g., suppose we have a solid whose boundary has two shells: a cube inside a cube. Then s = 2, h = 0. Now v = 16, e = 24, f = 12 and so v-e+f = 4, as desired.
[NOTE: Actually 2(s-h) is equal to h0-h1+h2 where hi are the Betti Numbers. See Mantyla, p.45.]
Extension to manifolds with boundaries. This is not much different from the manifold case. In terms of the polygonal model, we now allow symbols that appears at most once (in which case, its sign is irrelevant).
Examples: the closed disc, Möbius strip.
Extension to non-simply connected faces. If there are r rings (i.e., loops that represent holes in a face), we can clearly remove the ring by introducing an edge to connect the ring to the outer bounding loop. Thus e should be replaced by e+r to make the Euler-Poincaré formula hold. The modified Euler-Poincaré formula becomes:
|
TOPICS:
(1) each edge is identified with exactly one other edge. (2) each identified point is locally a disk.
Möbius Rule: if the polygons are oriented in such a way that for every pair of identified edges, one is + and the other -, then we say (P, V, E) is orientable.
homology theory stats that c = h0 - h1 + h2 where hi are the Betti numbers.
h0 is the number of connected components.
h1 is the connectivity number of S - it is the largest number of closed curve that can be drawn on the surface without disconnecting it. E.g., for a Torus, h1 = 2. In general, for a k-hold torus, h1 = 2k.
h2, for us, is always h0.
GENERALLY:
|
This h is the sum of the number of holes in each connected surface.