Friday, 14 October 2011

regularized boolean operators


Interior, Exterior and Closure


We need the concept of interior, exterior and closure to fully appreciate the discussion of regularized Boolean operators. Intuitively, the interior of a solid consists of all points lying inside of the solid; the closure consists of all interior points and all points on the solid's surface; and the exterior of a solid is the set of all points that do not belong to the closure.
Consider a sphere, x2 + y2 + z2 = 1. Its interior is the set of all points that satisfy x2 + y2 + z2 < 1, while its closure is x2 + y2 + z2 <= 1. Therefore, the closure is the union of the interior and the boundary (its surface x2 + y2 + z2 = 1). Obviously, its exterior is x2 + y2 + z2 > 1.
A solid is a three-dimensional object and so does its interior and exterior. However, its boundary is a two-dimensional surface.

Formal Definitions

Recall that the open ball with center (a,b,c) and radius r consists of all points that satisfy the following relation:
(x - a)2 + (y - b)2 + (z - c)2 < r2
A point P is an interior point of a solid S if there exists a radius r such that the open ball with center P and radius r is contained in the solid S. The set of all interior points of solid S is the interior of S, written as int(S). Based on this definition, the interior of an open ball is the open ball itself.
On the other hand, a point Q is an exterior point of a solid S if there exists a radius r such that the open ball with center Q and radius r does not intersect S. The set of all exterior point of solid S is the exterior of solid S, written as ext(S).
Those points that are not in the interior nor in the exterior of a solid S constitutes the boundary of solid S, written as b(S). Therefore, the union of interior, exterior and boundary of a solid is the whole space.
The closure of a solid S is defined to be the union of S's interior and boundary, written as closure(S). Or, equivalently, the closure of solid S contains all points that are not in the exterior of S.

Examples

Here is an example in the plane. You should change all open balls to open disks. Point A is an interior point of the shaded area since one can find an open disk that is contained in the shaded area. Similarly, point B is an exterior point. Point C is a boundary point because whatever the radius the corresponding open ball will contain some interior points and some exterior points.
Note that a surface (a two-dimensional object) is never a solid (a three-dimensional object). In fact, a surface does not have any interior point. Take any point of the surface (see figure below), the open ball with arbitrary radius and center at that point always intersects the sphere in an open disk (in pale green in the lower right corner). Therefore, no open ball can be contained in the sphere, and, as a result, that point is not an interior point of the sphere. Thus, we conclude that a surface does not have any interior point.



Regularized Boolean Operators


We certainly expect that the union, intersection and difference of two solids is a solid. Unfortunately, in many cases this is not always true. In the following figure, two cubes touch each other and their intersection is a rectangle shown on the right. A rectangle is not a three-dimensional object and hence not a solid!
To eliminate these lower dimensional branches, the three set operations are regularized as follows. The idea of regularing is very simple.
  • Compute the result as usual and lower dimensional components many be generated.
  • Compute the interior of the result. This step removes all lower dimensional components. An example has been shown in previous page. The result is a solid without its boundary.
  • Compute the closure of the result obtained in the above step. This adds the boundary back.
Let +, ^ and - be the regularized set union, intersection and difference operators. Let A and B be two solids. Then, A + B, A ^ B and A - B can be defined mathematically based on the above description:
A + B = closure(int(the set union of A and B)
A ^ B = closure(int(the set intersection of A and B)
A - B = closure(int(the set difference of A and B)
where closure() and int() are the closure and interior discussed in previous page. Based on this definition, the intersection of the two cubes shown at the beginning of this page is empty. As mentioned earlier, the set intersection of these two cubes is a rectangle, which is a two dimensional object and has no interior. Hence, after taking interior (i.e., int()), we get an empty set, whose closure is also empty. Consequently, the intersection is empty.



solid modelling


Solid Modeling - CAD is the primary uses of solid modeling

Solid modeling is the clear-cut representation of the solid parts of an object and is also known as volume modeling. Other forms of modeling include surface models, which is used extensively in automotive and consumer product design and also in entertainment animation, and wire frame models.
CAD is the primary uses of solid modeling as well as engineering analysis, computer graphics and animation, rapid prototyping, medical testing, product visualization and visualization of scientific research.
The basic theoretical concepts of solid modeling are:
1.Sweeping: An area feature is swept out by moving 2-D sketches along a path to create solid feature. Volumes are either added to the object, which is known as extrusion, or is removed from the material, which is called cutter path. This process is known as sketcher based modeling. This process is used in various manufacturing techniques such as extrusion, milling, lathe, and others.
2.BREP or Boundary Representation: In this process, a solid object is represented by boundary surfaces and then filled to make solid. This process is also referred to as surfacing. It is used in such manufacturing techniques as Injection molding, casting, forging, thermoforming, etc.
3.Parameterized Primitive Instancing: An object is specified through reference to a library of parameterized primitives. A screw for instance is modeled for a library. The model is used for all screw sizes by modifying a set of its parameters.
4.Spatial Occupancy (Voxel): The entire space is subdivided into regular cells, and the object is specified by the set of cells it occupies. Models, which are described this way, lend themselves to Finite difference analysis, which generally occurs once a model has been made. This is part of the automated pre-processing for analysis software.
5.Facet Modeling: This is generally used in reverse engineering pf physical models and is the forming of the outside surface outline of the volume from any triangular planes.
6.Decomposition: This is similar to spatial occupancy, however the cells are not regular, or prefabricated.
7.Constructive Solid Geometry: This is when simple objects are combined using Boolean operators including union, difference, and intersection.
8.Feature Based Modeling: This is complex combinations of objects and operators that are considered a unit that can be modified or duplicated.
9.Parametric Modeling: Elements of features are given labels instead of only fixed numeric dimensions. The relationships between the parameters in the entire model can then be tracked, making changing numeric values of parameters easier.