• Nie Znaleziono Wyników

Solid modelling with faceted primitives

N/A
N/A
Protected

Academic year: 2021

Share "Solid modelling with faceted primitives"

Copied!
111
0
0

Pełen tekst

(1)

Solid modelling

with faceted primitives

F.W. Jansen

Delft University Press

TR diss

1555

J

(2)

U y

t p

(3)

Solid modelling with faceted primitives

Proefschrift ter verkrijging van de graad van doctor

aan de Technische Universiteit Delft, op gezag van de Rector magnificus prof. dr. J.M. Dirken,

in het openbaar te verdedigen ten overstaan van een commissie

aangewezen door het College van Dekanen op dinsdag 1 september 1987

te 16.00 uur door Frederik Willem Jansen geboren te Amsterdam

ingenieur Industriële Vormgeving

TR diss

1555

(4)

Dit proefschrift is goedgekeurd door de promotoren Prof. W.H. Crouwel

(5)

Solid modelling with faceted primitives vn

Contents Preface xi

Part 1: Design and visualisation of solid models 1. Design representations 3

1.1 Modelling

1.2 Systematic methods

1.3 Types of design representations 1.4 CAD representations

1.5 Summary and conclusions 2. Solid modelling 11 2.1 Geometric representations 2.2 Constructive Solid Geometry 2.3 Internal representations

2.4 Visualisation of the solid model 2.5 Solid modelling with faceted primitives Part 2: Display of CSG polygon models 3. Faceted modelling 25

3.1 Internal and external data structures 3.2 Faceted primitives

3.3 Integrity checking 4. CSG evaluation 37 4.1 Introduction 4.2 Tree-pruning

4.3 CSG-tree traversal methods

4.4 CSG-tree evaluation by bitwise operations 4.5 Exploiting CSG coherence

4.6 Experiments and conclusions

5. Display and conversion algorithms 57 5.1 Spatial subdivision

5.2 CSG list priority algorithm 5.3 CSG ray tracing algorithm 5.4 Conversions

(6)

vm Solid modelling with faceted primitives

Part 3: Display of CSG halfspace models 6. CSG depth-buffering techniques 73 6.1 Introduction

6.2 Active tree 6.3 Tree restructuring 6.4 A tree traversal algorithm 7. Hardware implementations 83 7.1 Introduction 7.2 Display systems 7.3 CSG halfspace models 7.4 A multi-processor implementation Part 4: Conclusions 8. Conclusions 97

8.1 Solid modelling and industrial design 8.2 Further research References 99 Summary 103 Samenvatting 104 Curriculum vitae 10S Acknowledgements 106

The pictures on the backpages are generated with the program FACET, an experimental program incorporating the algorithms described in part 2 and part 3.

Plate 1. Wire-frame drawing of primitives. Plate 2. Wire-frame drawing of sweep object.

Plate 3. Two cylinders at different modelling accuracy. Plate 4. Boolean operations.

Plate 5. Primitive solids.

Plate 6. Projective display and ray tracing. Plate 7. Carburettor.

Plate 8. Car.

(7)

Solid modelling with faceted primitives DC

Parts of this thesis are revised versions of earlier published material:

Part 2:

Jansen, F.W. [1985], A CSG list priority hidden-surface algorithm, Proceedings Eurographics'85 Conference, 51-62, Elseviers Science Publishers, Amsterdam. Tamminen, M., and Jansen, F.W. [1985], An integrity filter for recursive subdivision

meshes, Computer and Graphics 9(4), 351-363.

Jansen, F.W. [1986], Data structures for ray tracing, In: Data structures for raster graphics, Kessener, L.R.A., Peters, F.J., Lierop, M.L.P. van (eds), Springer Ver­ lag, 57-73.

Jansen, F.W., Evaluation of Boolean object expressions for CSG hidden-surface algorithms. Submitted for publication.

Part 3:

Jansen, F.W [1986], A pixel-parallel hidden-surface algorithm for constructive solid geometry, Proceedings Eurographics'86 Conference, 29-40, Elseviers Science Publishers, Amsterdam.

Jansen, F.W. [1987], CSG hidden-surface algorithms for VLSI hardware systems, In: Advances on Graphics Hardware I, W. Strasser (ed.), Springer Verlag. Jansen, F.W. and Sutherland, R.J. [1987], Display of solid models with a multi­

processor system, Proceedings Eurographics'87, Elseviers Science Publishers, Amsterdam.

(8)

Solid modelling with faceted primitives XI

Preface

The subject of the research described in this thesis is the visualisation of solid models for Computer-Aided Design (CAD). Solid modelling is concerned with the computer representation of three-dimensional objects. For the description of solids in terms of their surfaces, two approaches can be taken: the boundary of a solid can be described with an exact surface representation or be approximated with flat sur­ face elements (facets). The second approach has the following advantages: the shape domain is fairly unrestricted, the processing of the surface elements is intrinsically simple, and the amount of processing is dependent on the faceting tolerance (accu­ racy of the approximation). However, the number of facets needed to give a visual quality that is comparable with an exact representation will be very large. The cen­ tral theme of this thesis is: given the fairly unrestricted shape domain, and the large number of facets necessary to give the same image quality as with the exact representation, what techniques can be developed to process the large number of facets efficiently? Two approaches have been investigated: a software-oriented approach that is described in part 2, and a hardware oriented approach that is described in part 3.

Part 1 provides a general introduction to modelling for industrial design, the background of this research. The role of design representations in the design pro­ cess and their counterparts in CAD are discussed. Further, the basic concepts of solid modelling and the techniques for display of solid models are introduced.

The solid modelling method described in part 2 is based on polygon approxi­ mation. The main theme there is that the large number of polygons needed for an accurate description of curved surfaces makes it necessary to use additional data structures. Two methods are applied for enhancing the processing, sorting and search of these surface elements: a filter for processing recursive subdivided surface meshes and a spatial index for efficient geometric search. A third method reduces the number of logical computations involved in the display of solid models. Algo­ rithms for the input, visualisation and conversion of solid models are given.

The development of VLSI-based display systems has stimulated the develop­ ment of algorithms that would not have been feasible for a single processor configuration, but which give nearly real-time performance with these new display systems. A depth-buffer algorithm that can be used with these systems is described in part 3. Algorithms are given for linear halfspace models, but the same tech­ niques also apply for higher-order surface representations. Further a version for a multi-processor system is given.

In part 4, the results are summarised, conclusions are drawn and directions for further research are suggested.

(9)

Part 1

Design and visualisation of solid models

CAD techniques offer facilities to enter, manipulate and interrogate design represen-tations (descriptions and models of the design product). Three design representa-tions are discussed: the design process representation, the functional model and the representational model. The representational model is the description of the design as it is documented and visualised by the designer in drawings and three-dimensional models. These design representations are comparable with the CAD representations that are currently proposed for use within CAD systems: the concep-tual model, the assembly model and the geometric model. For our subject, we focus on the input and display of the geometric model. Solid modelling representa-tions are discussed and methods for the design and visualisation of solid models are described. This leads to a scenario for the input, interactive viewing and high-quality rendering of solid models, and the central theme of this thesis: the display of faceted models.

(10)

Design representations 3

1. Design representations

The application of computer techniques to industrial design requires intermediate representations of the design. This situation is not new for designers. Designers have always used text, graphical representations and three-dimensional models to describe and visualise their intentions, because it is seldom possible or most of the time too expensive, to produce a real-world product immediately. Computer techniques extend the possibilities for the designer to 'model' the design and design perfor-mances. The introduction of these new methods and representations to complement or replace conventional techniques poses the question of their role in the design pro-cess and of their effect on the quality and efficiency of the design propro-cess. Several design representations and CAD techniques to generate and manipulate them are discussed.

1.1 Modelling

A model is a description of an object or process that describes a limited set of the attributes and relationships possessed by the original object or process. The use of the computer for design requires a computational model that replaces the original objects and object representations by a computationally convenient representation that captures those attributes possessed of the original object that permit the efficient performance of the relevant tasks within the planned scope or function of the model [Faux, 1986].

The question is whether the computational model models the characteristic properties of objects sufficiently to be useful in the design practice. In other words, is it possible to design with a computer representation of the design and the design process without unduly limiting the shape domain and without reducing the quality of the interaction that the designer is used to with his conventional tools (paper and pencil)? In order to answer these questions, it is necessary to know what kind of activities are carried out by the designer and which representations are sufficient to capture the relevant information. Without restricting other aspects of design, our main interest will be in this information processing: the process of design is the translation of information in the form of requirements, constraints and experience into potential solutions that are considered by the designer to meet required perfor-mance characteristics [Luckman, 1967].

Design methodology is concerned with the development and analysis of design methods and design representations. Design methods are techniques and pro-cedures that sustain and enhance the design process, and design representations are sources of data for describing attributes and relationships possessed by objects and which allow the evaluation of useful properties of objects. In Archer[1968] a logi-cal model is proposed for the design process and design activities. In the following sections, we seek to extend this model by adding design representations that are able to capture the relevant design information and support the necessary manipula-tions.

(11)

4 Design representations

1.2 Systematic methods

Design methodology has been influenced during the 1960s by research in problem solving, computer techniques and management theory [Cross, 1984]. It was the generally accepted idea that design could benefit from systematic methods taken from these disciplines. Central to the systematic methods approach was a twofold decomposition of the design process: a decomposition of design activities into analysis, synthesis and evaluation, and a decomposition of the complex design prob-lem into simpler sub-probprob-lems that could be solved with appropriate tools and methods. This decomposition was based on the assumption that there is a tool for each substage, whether it is an abstract mathematical method from operational research or a concrete tool such as prototyping. Some tools are used in the synthesis phase of design, others are used in the development and evaluation phase to simu-late and evaluate the design concept and its embodiment. The decomposition of the design problem into elementary subtasks and into subproblems enhances the use of these tools. In a second step, the solutions obtained could then be combined into an optimal solution.

Archer[1968] formulates on the basis of these assumptions a logical model of the design process that has the following components: the design program, the sys-tematic model and the operational model. The design program describes the design process and the design activities through the different phases of the design process, such as analysis, sketch design, preliminary design, prototyping and production. The systematic model, or disciplinary model, models the functional properties of the design with respect to aesthetics, costs, manufacture, strength, etc.. It can be viewed as a parametrised formulation of a sub-problem, a system to generate solu-tions. The operational model uses a systematic model, in combination with analo-gues, to measure and to optimise the performance of the design with respect to specific functions. Analogues are alpha-numeric, mathematical, graphical or three-dimensional representations of the design product.

In each phase of the design process, the design problem is decomposed into sub-problems and brought to a solution by an appropriate operational model (see fig. 1.1). The operational model (which can be seen as an evaluation process) applies a systematic model in combination with an analogue to evaluate the systematic model and to find a (local) optimum solution. As the design process proceeds, the sys-tematic model is refined and the conception of the solution grows.

Among the analogues, drawings and three-dimensional models are particularly important tools for the designer. In the synthesis phase, sketches and drawings are used to conceptualise and visualise ideas and design proposals. In the development phase, renderings are used to give a realistic impression of the product, and techni-cal drawings to document it for machining and assembly. Moreover, sketches and renderings record the design process itself: the portfolio of sketches and drawings are a registration of the choices made and steps taken during the design process. The designer can return to these documented activities in a later phase or, if desired, can explore alternatives in a subsequent design study. Besides these obvi-ous uses, Archer points to the role of analogue: drawings and models are used to

(12)

Design representations 5 Operational -model Analogues -Real world i

fettl

Systematic model Design program-^\-~~ Problems r*=rz 0m0

TIT

^kM

FFF^

Il i ■ i h , ' 1' i

"^;1tf"

" i r

m

Smj

nyë^_Jt^L-^-n^4^

Di

W

7

'-~^E

^E

Design

process phase 7 phase 2 phase 3

Figure 1.1. Logical model of design process.

simulate the performance of the design in certain aspects. They allow the designer to study the configuration of components, the assembly and construction of parts, and the functional and aesthetic quality of the product.

1.3 Types of design representations

Although Archer's logical model of the design process proposes a useful scheme for design activities (processes), no special methods or techniques (other than conven­ tional methods) have been suggested to make this scheme operational in order to improve the traditional design practice. Further, in design methodology, interest moved from the structure of the design process to the structure of design itself, i.e. the psychological and logical aspects of the design activity. Also, important ele­ ments of the systematic methods, such as a thorough analysis of the design problem before synthesis and evaluation, were replaced by other procedures emphasising the creative and generator-conjecture aspects of design. However, there seems to be no specific reason to discard Archer's logical model as long as the proposed structure of the design process supports creative activities and does not supplant them.

A systematic approach to design and the use of design representations may even support the creative activities. In this context it is worthwhile to notice that drawing and model making (in the traditional sense) is also a creative process. It stimulates the generation of new ideas and may gradually lead to solutions that were not or even could not have been envisaged before hand. The translation and conversion of ideas in visual concepts may very well be a major source of inspira­ tion. A second observation teaches us that there is an essential difference between the synthesis of a design and its evaluation. A design concept may be very well

(13)

6 Design representations

analysed in terms of a systematic model. Given the basic solution, the design may then be optimised with respect to that concept. In the synthesis phase, however, no systematic model can guide the designer. The best he can get are some hints in the form of 'issues' that come from his analysis of the problem and that give some direction to his search. Here the word search best describes design in this phase. The search, however, is made much easier if design representations can easily be created, evaluated and modified. For optimal search, fast response and freedom of manipulation is essential.

The generation of concepts and the gradual improvement of the design embo­ diment involves a repeated regeneration of drawings and models. From this point of view most design activities arc concerned with information processing of geometric and graphical data. It is here that the computer, as an information pro­ cessing machine, enters the design practice. With the computer, it is easy to input, store and retrieve data and to display this information, whether text, graphics, or three-dimensional shape data, on a graphics display, a plotter, or a numerical con­ trolled milling machine. With this computer or rather CAD system, the designer can analyse data, convert them into different representations and use them to check performances, to simulate the visual appearance and to document the design product for production.

Preferably, the product information is maintained in the system and can be used repeatedly for different applications, instead of redrawing or reshaping the model over and over again. However, in order to store and retrieve the data quickly and to handle the data automatically, it has to be structured.

To make Archer's logical model operational for this purpose, three design representations are proposed: a design process representation, a functional model and a representational model (see fig. 1.2). The design process representation docu­ ments the design program and stores all relevant information concerning the require­ ments, intermediate proposals, results of analysis, etc.. The functional model describes the product in functional components that can be evaluated by the opera­ tional model. The functional model is a conception of the solution as described by the systematic model. The representational model describes the product, its geometry and material specification, explicitly, or implicitly by procedures to pro­ duce the product. The representational model may be derived from the functional model, because it is the explicit formulation of the 'conceptual' solution. The representational model serves two purposes: it describes the solution and it may function as an analogue (computer model) or may be used to generate analogues (for instance graphics). This double role makes its use very efficient.

These three design representations are the carriers of information for both the design and the design process. The basic issue concerning the use of computers in design is whether these design representations can be modelled successfully in CAD.

(14)

Design representations 7 Real world Operational model Analogues -Representational model Functional model Om, Design process

rrr

Rm,

TE

Fm. Design process —| representation r i Design program-* Problems !• Om-,

'lit

V

a

Rm->

m

Fm-,

*rttf

*3

a

Rm3

XL

Fm3

^=E

I

l-p-d,^ FFp-d.,^ ^ f i ^

p/?ase 7 p/iase /■ p/iase 3

Figure 1.2. Design representations.

1.4 CAD-representations

A Computer-Aided Design and Computer-Aided Manufacturing (CAD/CAM) system is an information processing system for the design and production of industrial pro-ducts. Central to this information processing is the input, storage and interrogation of the product data that describe the product and its manufacturing specification. The product data are stored in the product model. Because the product model serves as the intermediary for all activities on the product data, its structure is basic in maintaining the integrity and consistency of the product data. Further, the pro-duct model has to support the communication between different partners who enter and interrogate the data, and application programs that use data from the product model to analyse, document or manufacture the product

The information described in a technical drawing is two-fold: it is a geometric description of the product specified in the cross-sections by dimensioning and tolerancing, and secondly, it is the specification of the material and the manufacture in the form of the symbols and text to instruct the production planning and quality control. The central issue in CAD/CAM is the modelling of all this information in a product model inside the computer [Wesley, 1980]. For some time, the paradigm in CAD has been to replace the engineering drawing by a complete three-dimensional geometric description of the product. This geometric model would then serve as the central data base for all inquiries, whether for design analysis or for production and assembly purposes. At first this approach seemed adequate, because sufficient information could be derived from the geometric model to

(15)

8 Design representations

calculate views and cross-sections of the model, to calculate mass properties and to feed a numerical controlled milling machine. Later, however, it turned out that for a large range of other inquiries the elementary geometric information did not pro­ vide enough clues to cope with all situations. For example, from a purely geometric description, it is often hard to re-interpret a shape to be a cylindrical hole that can be drilled instead of a free-form region that should be milled. If it was the intention of the designer to drill a hole at that position, then that information should be kept with the model and be available for interrogation. Further, all this addi­ tional information of a technical drawing is difficult to attach to the geometric model.

Within the international standardisation bodies (PDES.STEP), product data representations are being developed that provide a more comprehensive product modelling approach than only the. geometric description of the product [PDES, 1986]. The main advantages of this approach are the storage of all data concerning the design process into a conceptual model, and of the functional description of the product into an assembly model.

The conceptual model stores all project information, including planning and cost calculations. Further, it provides an infra-structure and an information model­ ling method (meta-model) for inter-system communication. It also contains the more specific product data infonnation such as the assembly model and the geometric model.

The assembly model is a hierarchy of components, each described by a set of features. A feature is an abstraction of some area of interest on a part [PDDI, 1984], such as holes, rims, depressions. See [Faux, 1986] for a recent overview of feature modelling. Bach feature has one or several meanings attached to it, each relevant for a certain application area. An application program translates a feature into an entity relevant to its own functional context, or it converts features into features that are specific for that application, for instance, design features into manufacturing features. Feature modelling aims at the description of the functional aspects and relations between components, such as dimensioning and tolerancing, design con­ straints and assembly specifications. However, the feature description encompasses also a geometric description of the part. Thus, if desired a geometric model can be derived from the feature description by converting the procedural description of the features into a geometric description.

1.5 Discussion and conclusions

Interest in systematic methods for design has resulted in the analysis of the design as a multi-staged process, and in the recognition that design representations (descriptions and models of the design product) are important development tools for the industrial designer.

For a systematic design process, three design representations are relevant: the design process representation, the functional model, and the representational model. The design process representation records the design process, the functional model is used to analyse the perfonnances of the design and the representational model

(16)

Design representations 9

documents the design embodiment. These three design representations are covered to a great extent by the three CAD design representations, the conceptual model, the assembly model, and the geometric model (see fig. 1.3).

logical model design process

design representations I CAD representations CAD techniques

design program— analogues \_ , / systematic - design process representation drawings 3-d models i representational model t functional model conceptual model drawings 3-d models geometric model assembly model ■ information modelling computer graphics numerical control, etc. _ solid

modelling feature modelling

Figure 1.3. Overview of design representations.

To use these models as tools, the designer must be able to enter and manipulate these representations in'an easy and effective way. Central to this issue is the qual­ ity of the interface between the designer and the system. This quality is to a large extent dependent on the interaction of the designer with the representational model, the geometric description of the desiga This interaction has two aspects: the input and definition of the geometric model, and the display of the model.

Effective design requires powerful and easy to use input methods. Solid modelling has improved on existing methods by offering a volume modelling approach, freeing the user from the tedious task of specifying a large number of coordinates. However, more powerful and sophisticated specification techniques are still needed. Also model specification has to be brought into the conceptualisation phase to allow easy definition and manipulation of design concepts. A great deal of improvement to existing techniques will have to be realised for the interaction between designer and machine to be optimised.

The second aspect of the interaction between the designer and the system is the display of the geometric model, the subject of this thesis. The display of geometric models serves three purposes: input of the model, viewing for inspection and analysis, and high-quality rendering for the purpose of presentation. These three types of visualisation show different trade-offs between speed and image qual­ ity. Input requires direct feedback, while high-quality rendering is less critical with respect to time, because image quality is most important. However, for viewing there is a need for image generation that is both fast and good in image quality. In

(17)

10 Design representations

addition to the rendering quality, the time to generate pictures is also dependent on the complexity of the model. It is therefore worthwhile to study methods and tech­ niques for displaying complex three-dimensional objects within a reasonable time. As an introduction, the following chapter discusses standard modelling and display techniques for solid models and, in subsequent chapters, techniques to improve the efficiency of these methods are presented.

(18)

Solid modelling 11

2. Solid modelling

Geometric modelling is concerned with the input, storage and interrogation of geometric data, specifically for the description of products to be designed and manufactured. Several geometric representation schemes are used in CAD/CAM-systems. Among these, solid modelling aims at a complete and unambiguous representation of rigid solid objects. A central method in solid modelling is Con­ structive Solid Geometry (CSG) which defines objects as combinations of primitive solids. These primitive solids can internally be described with an exact or with an approximated boundary, i.e. as solids bounded with well-behaved (smooth) surfaces or as polyhedra with a faceted boundary. The use of these representations is dis­ cussed here in the context of visualisation of the model for interactive input and viewing, and high-quality rendering.

2.1 Geometric representations

The geometric modeller is the part of a CAD/CAM system that processes geometric data representations of objects. To be useful within an application area, the modeller should meet the following requirements:

- The geometric coverage, i.e. the range of shapes that can be represented, should be adequate for the area of application.

- The system should provide easy-to-use and efficient tools for creating and edit­ ing these models.

- The geometric representations should be reliable and efficient, i.e. the stored information should provide accurate answers to geometric queries within a rea­ sonable time.

To meet die reliability requirement, die geometric representations and me operations (algorithmic procedures) that manipulate these representations (without interference of the user) should maintain the integrity of the model, i.e. each representation should be valid and complete. For a formal discussion on geometric representations see [Requicha, 1980].

Three geometric modelling methods are used in CAD: wire-frame modelling, sur­ face modelling and solid modelling. A wire-frame model is the most elementary: the object is represented by a set of contour or cross-sectional curves (fig. 2.1b). The wire-frame model is sufficient to provide the information for a wire-frame drawing of the object which, for instance, may be used for the interactive input of die model. However, the absence of an unambiguous description of the boundary of die solid limits the use of this method for other applications.

(19)

12 Solid modelling

0

a

e

a. object b. wire-frame c. surface model d. solid model

Figure 2.1. The three main representations in geometric modelling: wire frame model, surface model and solid model.

The second method, surface modelling, defines an object as a collection of surface elements that describe the boundary of the object (fig. 2.1c). The volume is here defined implicitly. Several types of surface elements can be used: polygons ( flat surfaces bounded by straight lines), analytical surfaces (for instance parts of spheri­ cal and cylindrical surfaces) and more general free-form surfaces (for instance parametric surfaces, such as defined by the Bezier and B-spline method). The shape domain is fairly unrestricted, being only limited by the effort needed to input com­ plex shapes. Most CAD/CAM-systems nowadays are based on surface modelling. Surface models provide a more complete description than wire-frame models, but because the model is constructed by adding together parts of the boundary under control of the user, the result may be an invalid - and hence unmachinable - object. Both the need to keep the geometric model consistent under geometric operations, and the desirability of offering the user a more hierarchical approach to the definition of the geometric model, have created an increasing interest in solid modelling techniques.

Solid modelling offers a volume modelling approach: the user is provided with a set of elementary volumes and a set of transformations and operations that can be performed on them (fig. 2.1d). The transformations and operations are used to position and to combine the volumes to form composite solids. The set of transformations comprises translation, rotation, scaling, and skewing. The set of operations includes the Boolean operations union, difference, and intersection, which corresponds with adding volumes, subtracting volumes and taking the com­ mon part of two volumes (fig. 2.2). Constructive Solid Geometry (CSG) embodies this 'constructive' approach in its most explicit form.

(20)

Solid modelling 13

AuB A-B 8-A AnB a. union b. difference c. intersection

Figure 2.2. Boolean operations: union, difference and intersection.

The elementary volumes may be defined in terms of polygons or analytical surfaces, but whatever basic surfaces are used, they should be complete, consistent and valid object descriptions. If the basic volumes are consistent, the system guarantees that the composite solid resulting from its operations is also consistent, thereby freeing the user from having to check it for non-existence or other deficiences. Although the basic volume modelling approach is shared by all solid modellers, the internal representation of the geometric model differs widely among systems. Also within one system often more than one representation is usually maintained. According to the main internal representation, modellers are classified as CSG, boundary or volumetric modellers.

2.2 Constructive Solid Geometry

Constructive Solid Geometry (CSG) defines objects by applying transformations and Boolean operations to elementary volumes, such as block, sphere, cylinder and cone [Requicha, 1980]. The CSG defined object is internally represented as a binary tree (CSG-tree). The primitive solids are positioned at the leaves and the internal (com­ posite) nodes contain the Boolean operations; transformations can be stored both at the leave nodes as well as at the internal nodes. The internal nodes represent the subsolids defined by performing the transformations and the set operation of that node to its two subsolids. The root node represents the resulting composite object (fig. 2.3).

The modelling range of the CSG representation is the set of solids that can be generated by combining primitive solids; it is thus dependent on the set of available primitive solids. A standard repertoire of primitives is offered by primitive instanc­ ing: solids are instances of pre-defined elementary volumes, such as block, sphere, cone and cylinder (fig. 2.4a).

A powerful extension is formed by the 'sweep' primitives (fig. 2.4b). The sweep primitive is the volume that is swept by a base plane, bounded by a 2-D curve (contour), that is moved along a 3-D curve (trajectory). Scaling and rotation of the contour during the translation further enlarge the shape domain. Specific instances are:

(21)

14 Solid modelling A = block 20 12 6 B = block 16 8 8 move B 2 -1 C = cylinder K 10 move C z -2 Object = A - IBnCl a. commands

i&

c. primitive solids d. positioned e. resulting object

Figure 2.3. Example of CSG representation.

method models extrusion-shapes.

- Rotational sweep: the contour is a curve and the trajectory is a circle; this models rotational-symmetric shapes.

- General sweep: both the contour and trajectory are general curves; this models a large family of profiles (fig. 2.5a).

Bending can be modelled by using free-form curves for the trajectory. Rotation of the contour leads to twisted shapes (see also [Post and Klok, 1986]).

A basic primitives b. sweep c. free-form

Figure 2.4. Primitive solids.

/ \

A i

/ \

B C b. CSG-tree

(22)

Solid modelling IS

A related method is lofting, also referred to as skinning or general duct surfaces. Instead of one contour that is swept along a trajectory, several contours are spanned along a central spine [Tiller, 1983]. The surface of the object interpolates these contours (fig. 2.5b).

More general-curved surface elements that may be part of a solid are blends, roundings and free-form surfaces (fig. 2.4c). Some of these shapes result from shape operators that locally add or subtract material. In [Varady and Pratt, 1984] an overview is given of these shape operations. Most of them, however, are difficult to incorporate in a solid modelling scheme because of the difficulty of guaranteeing the integrity of the resulting solid.

a. sweep b. lofting

Figure 2.5. Sweep and lofting.

The CSG representation can be entered by alpha-numeric specification of the primi-tives, transformations and operations (fig. 2.3a). Alternatively, a graphics interface may be used to select items from a menu and position primitives interactively. Additional modelling facilities may be provided in the form of libraries, history files that can be edited [Takala, 1985], or design process representations [Chiyokura and Kimura, 1985]. Further, special languages have been developed for procedural modelling. For an example see [van Wijk, 1986]. The combination of graphical and procedural modelling, together with new developments in user interface management systems, feature modelling and programming languages, offers a new and challenging area of research and opens new opportunities to improve the design and manipulation of the geometric model, mentioned in section 1.5.

2.3 Internal representations

Internally, the primitive solids are converted into one of the following representa-tions: a halfspace model, a boundary model or a volumetric model. The CSG-representation is a suitable CSG-representation for the input of the model but, because it is defined as a combination of solids (or halfspaces), no explicit boundary or volumetric information is available. To obtain this information, the CSG

(23)

16 Solid modelling

(halfspace) model is converted into one single boundary or volumetric representa-tion.

23.1 Halfspace models Halfspace models are formed by a combination of halfspaces (fig. 2.6). A halfspace is defined by an unbounded surface that divides space into an object-side (material) and a non-object side (empty).

H = hlnh2nh3nhi

a. halfspace model (2D)

Figure 2.6. Halfspace modelling.

object = h,nh2 nh3nht, nhsnh6

b. halfspace model 13D)

A linear halfspace is an unbounded volume of which each point satisfies the linear equation ax+by+cz+d S 0. A finite solid is defined by the Boolean combination of four or more linear halfspaces. Replacing every occurrence of a primitive in the CSG-tree by its halfspace subtree gives rise to a CSG halfspace model, a CSG-tree of only halfspaces.

23.2 Boundary representations Surface models are formed by constructing a closed boundary of surface elements, e.g. polygons (fig. 2.7). Boundary models are surface models that satisfy two additional constraints: the integrity of the surface (the connectivity of the surface elements) and the integrity of the solid (two surfaces are not allowed to intersect, except at a common edge) have to be preserved. For a detailed discussion on these 'local' and 'global' properties, see [Mantyla, 1983]. Generally, the boundary representation is defined as an hierarchical data structure of faces, edges and vertices. The vertices defined by coordinate triples, represent the geometric part of the data. The 'topology' is defined by references from object to faces, and from faces to vertices. Additional references, e.g. from face to face, can be included in the data-structure to improve the efficiency of geometric inquiries. A well-known example is the winged-edge representation [Baumgart, 1975]. The boundary modelling scheme was introduced by Braid[1973] and Baumgart[1975] and theoretically founded by the contributions of Requicha[1980], Tilove[1980] and Mantyla[1982].

(24)

Solid modelling 17

H object zlq.^.Pj.Pi.Ps.Pt)

a. polygon b. polygon model

Figure 2.7. Polygon modelling.

The composite CSG-rep can be converted into a (single) boundary representation by a boundary evaluation. This conversion is performed by splitting intersecting faces of primitive solids and classifying these as 'on' or 'off to determine whether they belong to the composite solid or not. Finally, the faces that classify as 'on' are merged into a new boundary representation (see fig. 2.9a).

233 Volumetric representations A volumetric representation is created by a decomposition of the solid into regular volume elements, usually cubes (fig. 2.8). The elementary form of this Spatial Enumeration (SE-rep) or block model, is a spa-tial array of 'voxels', volume elements of the same size.

e w

a. volume element b. spatial enumeration

Figure 2.8. Volumetric representation.

A more compact representation can be obtained by an adaptive binary or octary recursive subdivision of object space, resulting in a bintree and octree representation

(25)

18 Solid modelling

[Meagher, 1982], [Samet and Tamminen, 1985]. Here the object is represented as a tree of which each leaf node corresponds to a region of three-dimensional space that is classified as 'in' or 'out' the object Volumetric modellers find their natural application where the basic input is the output from a scanner that samples data on a regular grid, such as in computer tomography.

A CSG object can be converted into a volumetric representation by a 'spatial evaluation'. Object space is subdivided into regular volume elements. Next these are classified as 'in' or 'out' with respect to the individual primitives of the CSG object. The individual classifications are then combined according to the CSG-tree. Depending on the spatial subdivision strategy, adjacent cells with the same classification can be merged into larger blocks (fig. 2.9b). A more efficient version of this conversion algorithm interrogates the CSG object with a bundle of parallel rays, and converts the intersection trajectories of these rays into rows of 'voxels' [Lee and Requicha, 1982].

a. boundary representation b volumetric representation

Figure 2.9 Boundary and volumetric representation (object of fig. 2.3).

Both the boundary and volumetric representations are typically data-oriented representations, in that all geometric information is converted into its most basic form: faces, edges and vertices, or regular volume elements. With these conver-sions, all higher order surface information is lost and it is difficult to recreate this information again from the data. It is therefore good practice to maintain a CSG representation along with a boundary or volumetric representation.

23.4 Faceted models Boundary and halfspace models may consist of curved sur-faces defined by quadratic, cubic and higher-order implicit or parametric equations. With these exact mathematical representations, the boundary is described with well-behaved (smooth) surfaces (surfaces with at least first derivative continuity). The numerical representation is compact; a limited number of coefficients is sufficient to describe fairly complex shapes and their properties. However, the pro-cessing may be rather complex, and different for each type of surface. Curved

(26)

Solid modelling 19

surfaces can be approximated within a certain tolerance by polygons or linear halfspaces. Linear approximations of curved surfaces are less compact but easier to process than higher-order surface descriptions, although the usually large number of surface elements may pose a problem of its own. An inherent drawback of linear approximations is the 'faceted' appearance of surfaces that were intended to be smooth. This faceted appearance can only be partly camouflaged for the eye by smooth shading, a technique to interpolate an intensity shade over a polygon in a way that suggests a curved surface.

2.4 Visualisation of the solid model

The model can be visualised with line drawings and shaded pictures. Line drawings of different views of the object are a suitable representation for graphical interaction on the model: by relating points in different views, three-dimensional data about vertices, edges and faces can be input. A drawback of line drawings is their insufficient representation of depth, and therefore additional depth cues (motion, intensity modulation, hidden-line removal, etc.) have to be added to give an unam­ biguous view of the model. Shaded pictures give a more realistic impression, but they require more processing, i.e. for calculating the visible surfaces. There are two different drawing techniques for shaded pictures: projective methods and ray trac­ ing. Projective methods are based on the drawing analogue: surface contours are projected on the image plane and the interior area is set to the calculated shading intensity of the object. Ray tracing is based on the camera analogue: for every point of the image plane the light intensity received from the scene is calculated. Ray tracing effectively models optical effects, such as mirroring reflections, cast shadows and transparency with refraction, but it is slow. Projective methods lack the image quality of ray tracing, but are an order of magnitude faster.

2.4.1 Projective algorithms Central to all projective hidden-surface methods are the projection and scan-conversion of the surface elements (fig. 2.10). The vertices and edges are projected on the image screen by a perspective projection and the

(27)

20 Solid modelling

intersection intervals of the scan-lines are calculated and set to the appropriate shad­ ing intensity. Alternative methods are sampling of the surface and subdividing the surface until surface elements cover only one pixel. The visible surfaces are deter­ mined by a depth-sort: elements nearer in depth have a visual priority over elements at a greater distance of the viewpoint. The different projective hidden-surface algo­ rithms can be characterised by the sorting order applied on the surface elements [Sutherland et al., 1974]. In scan-line algorithms, a list of active surface elements is updated before a sorting is applied to find the visible elements for a part of a scan-line. The depth-buffer (z-buffer) algorithm renders the surface elements in object order and performs a depth sort at each pixel by comparing the depth of the element with the depth value in a depth buffer. Initially, all pixels in the depth buffer are set to a maximum depth value. Next, the surface elements are scan-converted and for each pixel covered, the depth of the element is compared with the depth value in the depth buffer. If the depth value of a surface element is smaller than the corresponding buffer value for that pixel, then the pixel is rendered and the new depth value is written in the buffer. List priority algorithms render the surface ele­ ments in increasing priority order (back-to-front) into the frame buffer with the so-called painter's algorithm (overwriting earlier rendered elements). The depth prior­ ity algorithm sorts the surface elements dynamically for each different viewpoint [Newell et al., 1972]. Nearly real-time performances have been obtained with (eye-point independent) fixed order techniques, such as cluster ordering [Schumacker, 1969], and BSP-trees [Fuchs et al., 1983]. Real-time performances are within reach for projective algorithms implemented on VLSI-based hardware display systems [Clark, 1982], [Fuchs et al., 1985].

2.4.2 Ray tracing Ray tracing [Whitted, 1980] is a very elegant hidden-surface algorithm that has provided some of the finest examples of image synthesis in raster graphics. The 'point-by-point' approach of ray tracing was first described by Appel[1968] and Goldstein and Nagel [1971], Central to the algorithm is the ray object intersection calculation. For every pixel of the image plane that is located between the eye and the scene, a ray is cast from the eye point through the pixel into the scene, and a search is made for intersections with objects (fig. 2.11). After finding die intersection with an object, the correct intensity or colour is calculated and assigned to the pixel. If no intersection is found the pixel is set to die back­ ground colour.

To model the light conditions of an environment, light sources are simulated and the shading of the surfaces is calculated based on the intensity of the light and the colours and reflection properties of the surfaces [Blinn, 1977]. For calculating mir­ roring reflections and transparency with refraction, the ray is followed after reflection or deflection on the surface of the object, in search of other objects that contribute to the intensity or colour of the first surface by mirroring, etc. (fig. 2.11). With the same technique cast shadows can be calculated. Additional rays (secon­ dary rays) are cast from the first intersection point and directed to the light sources; if the rays intersect other parts of the object or other objects, the surface is hidden from the light source; no direct light is reflected and die surface is in the shadow.

(28)

Solid modelling 21

CV light source

ray for shadow test

ray for transparency

ray for mirroring

image plane eye point

Figure 2.11. Ray tracing,

2.43 Display ofCSG models For display of a solid model, the CSG representation can first be converted into a boundary or volumetric representation, which can then be displayed with standard hidden-surface algorithms. However, this conversion may be time consuming, and it is often more efficient to combine the CSG evalua­ tion with the hidden-surface removal, i.e. the surface elements are classified together with the visibility calculation. The evaluation method for this approach is similar to the spatial evaluation, except that surface elements are classified. The hidden-surface algorithm samples the object with a bundle of rays or lines of projection and for each ray or line the surfaces of the intersected primitives are classified to deter­ mine whether they are part of the boundary of the resulting solid or not. The nearest surface in depth that classifies as 'on' the composite object is rendered. See section 4.1 for a detailed description of these techniques.

2.5 Solid modelling with faceted primitives

Hidden-surface algorithms have been developed through the 1960s and 1970s for different types of surface and solid models, but only in 1982 was the first algorithm for direct display of CSG models published by Roth, a CSG ray tracing algorithm which uses exact representations of the primitive solids [Roth, 1982]. A year later Atherton published another important algorithm, a CSG scan-line algorithm that uses polygon primitives [Atherton, 1983]. These two algorithms can be combined with an user-interface for the following scenario for the design and visualisation of solid models:

(29)

22 Solid modelling

- The solid model is specified via a graphics interface or, alternatively, specified via a procedural language; line drawings are used for interaction.

- The model is viewed with a projective hidden-surface algorithm, for instance the CSG scan-line algorithm.

- A high-quality rendering picture is generated with a ray tracing algorithm. For an implementation of this scenario see [Steenbrugge, 1986], [Bronsvoort et al., 1985], [Bronsvoort, 1986] and [van Wijk, 1984a, 1984b, 1986].

This scenario shares some features with 'previewing'. Previewing facilities involve a trade-off between processing time and image quality. They are used to improve the response time for specifying modelling and shading parameters, for instance, the use of wire-frame pictures for model input, and faceted modelling for fast shading [Ath-erton, 1983], [Jansen and van Wrjk, 1983]. Certain aspects (modelling or shading) can be optimised while using simplified calculations for the other aspects. Preview­ ing thus provides an 'analogue' for the desired result. Further, pictures generated only partially or at a lower image resolution may be sufficient for interpretation, and so improve the interaction. Also default settings and the use of meaningful specification modes for the input of 'modelling', 'viewing' and 'shading' parameters may reduce the processing and improve the interaction [van Wijk et al., 1985].

The research described in this thesis further explores this scenario, in particu­ lar the use of linear approximation for the display of solid models. The model can be displayed with different faceting tolerances both for a preview as well as for an accurate rendering. Further, linear approximation is of interest because of its fairly unrestricted shape domain and its uniform processing; different types of procedural and analytical defined models may be added to the system, without altering the scan-conversion and sorting procedures, and only requiring a conversion algorithm for the linear approximation.

For hidden-surface algorithms, the line-surface intersection (for ray tracing) and the scan-conversion (for projective algorithms) are most important. Higher-order surfaces are difficult to intersect and even more difficult to scan-convert. Linear approximations are simple to intersect and to scan-convert, but the large number of surface elements usually severely reduces the overall efficiency.

This leads us to the central research question of this thesis: given the fairly unrestricted shape domain of linear approximations, and the fact that a large number of polygons are necessary to give comparable image quality with that given by exact representations, what techniques can be developed to process the large number of polygons more efficiently. Two approaches are presented.

In part 2, special data structures and algorithms are proposed for efficient pro­ cessing of models defined with a large number of polygons.

In part 3, a CSG depth-buffer algorithm is described for the display of linear halfspace models. The use of this algorithm in combination with recently-developed VLSI-based display systems brings the display of linear CSG models within nearly real-time. Further, a multi-processor version based on a subdivision approach is proposed.

(30)

Part 2

Display of. CSG polygon models

A solid modelling approach is presented based on polygon approximation of primi­ tive solids and the use of three additional data structures: a filter for processing recursively subdivided surfaces, a CSG buffer for the intermediate storage of CSG classifications and a polygon database that can be accessed by a spatial index. Algorithms are given for the definition of the primitive solids and their conversion into polygon models, and for the interactive viewing and high-quality rendering of the CSG model, and for the conversion of the CSG model into boundary and volumetric representations.

(31)

Faceted modelling 25

3. Faceted modelling

Solid modelling is concerned with the geometric description of three-dimensional objects. To be useful within a CAD/CAM system, solid modelling techniques should be able to model and process product geometries within a reasonable time. In this context, geometric complexity poses a problem. This is certainly true for the envisaged application area, industrial design, where products with curved surfaces often occur.

One method to reduce complexity is to decompose the object into several more elementary volumes, as in Constructive Solid Geometry (CSG). The process­ ing can further be simplified by approximating the curved surfaces of the primitives with polygons. This eliminates the complex processing of quadratic and higher order surfaces but poses a new problem in processing the resulting large number of polygons (typically 10,000 to 100,000). In the following sections, three data struc­ tures are proposed to process these large number of polygons more efficiently. 3.1 Internal and external data structures

Boundary models implicitly describe three-dimensional solids by enumerating the surface elements that constitute the boundary. Although a list of surface elements (each surface element may be denned with a list of vertices) is sufficient to define a boundary representation, often additional information on connectivity relations between elements is stored in a hierarchical data structure to enhance operations on the boundary. A well-known example is the winged-edge data structure [Baumgart, 1975]. This type of data structure can be denoted as 'internal' to the model, in that it specifies connectivity relations (the topology) between elements of the model. There is also a class of data structures that stores (intermediate) evaluated (geometric) properties of the model. This type of data structure can be denoted as 'external' to the model. Ideally, it would permit the processing of the model in a sequential way with an algorithm that acts like a filter, collecting and passing data from the model into a data structure that serves as a buffer.

Both approaches have their advantages, and occasionally they are used in combination [Mantyla and Tamminen, 1983], but for models with 10,000 or more polygons, the amount of data and of processing needed to maintain an internal data structure will exceed manageable limits in both memory requirements and process­ ing time. For this reason, the internal structures are here kept to a minimum and three external data structures are proposed instead. This chapter deals with the definition of the primitive solids and their conversion into polygon models. This conversion may locally destroy the integrity of the surface. An integrity filter is applied to restore the integrity of the polygon meshes. In chapter 4, a CSG-buffer and list structure is introduced that stores intermediate results of CSG classification tests. As a result, CSG coherence can be exploited. Further, it permits the inter­ mediate storage and referencing of this information, thereby enabling a stepwise evaluation of the CSG model for the algorithms of chapter 5. In chapter 5, a spatial subdivision method is applied for enhancing the hidden-surface and conversion algorithms.

(32)

26 Faceted modelling

3.2 Faceted primitives

The CSG model is input by specifying the CSG-tree and the dimensions and posi­ tion of the primitive solids. These input representations (name of primitive type and parameter list) are internally converted into polygon models.

3.2.1 Input representations Primitive instancing provides a standard set of primi­ tive solids: sphere, cylinder, block and cone. However, with these primitives only a limited shape domain is covered. Sweeping provides a powerful extension of this domain. The following describes the implementation of sweeping in the modelling system described in this thesis. A sweep object is defined by the form that is swept by the transformation of a contour (a closed planar 2D curve) along a trajectory, in general a 3D space curve (fig. 3.1). The contour is kept orthogonal to the local tangent to the trajectory.

/ \ / i "4—VLCL u contour V / v Y ~ ~ —• -z\ Itrajectory \base plane

Figure 3.1. Sweep definition.

The trajectory is defined in terms of a parametric vector function: T(r) = 0,(r), ty(r), tz(r)), r{ <, r Z rj

As r goes from rt to r;-, the components trace out the trajectory.

The closed 2D curve that is swept along the trajectory can also be defined parametr-ically relative to its own u-v coordinate system.

C~(S ) = (Cu (S ) , Cv (S ) ) , Si £ S £ Sj

The u-v coordinate system is kept orthogonal to the trajectory. This leaves one degree of freedom, because it still can rotate around the local tangent to the trajec­ tory (fig. 3.1). To orientate the contour, v is chosen to align with the projection of

(33)

Faceted modelling 27

the positive y-axis of the contour base plane on the u-v plane. For the trajectory intervals where the projection of the y-axis coincides with the direction of the tra­ jectory, the orientation is interpolated. Other methods proposed by Klok[1986] are a rotation minimising sweep and a sweep based on the Frenet system, where the discontinuity in the rotation of the Frenet frame at points of inflection of the trajec­ tory is removed.

The sweep definition is further generalised by a rotation and a scaling of the contour in its own u-v coordinate system. The user defines the object by specifying four design curves: a contour, a trajectory, a rotation function and a scaling func­ tion. Each design curve can be a linear, quadratic or cubic B-spline curve. The rotation and scaling functions are dependent on the trajectory parameter r, which is functionally related to the arc-length of the trajectory. Some instances of this sweep definition are depicted in fig. 3.2.

8 &

O

contour trajectory 1 scale 0 scale 1 scale 2 scale 3 trajectory 2 scale 1 scale 2,3 trajectory 3 scale 1 scale 2,3

Figure 3.2. Repertoire of sweep-defined shapes (O-constant, 1-linear, 2-quadratic, 3-cubic).

Some combinations of design curves may generate self-intersecting surfaces, thereby destroying the integrity of the solid. The same applies for other feasible shape-generation schemes, such as lofting and free-form surface definitions. For these schemes, additional techniques are required to handle the problems of orientation,

(34)

28 Faceted modelling

tangency, continuity and self-intersection. These are beyond the scope of this pro­ ject.

3.2.2 Linear approximation The input representations are internally converted into polygon models. The sphere, cylinder and cone are approximated by a regular mesh of polygons, the resolution of which is dependent on the required accuracy (see plate 1).

The sweep-defined solids and free-form surfaces are approximated by a polygon mesh created by an adaptive subdivision of the surfaces. The sweep object is first subdivided into 'surface patches' in the following way. The contour and the trajectory are denned by B-spline curves. These curves can be subdivided into seg­ ments, each described by a piecewise-polynomial representation. If the number of contour segments is n and the number of trajectory segments is m than the 'swept surface' of the sweep object can be subdivided into n*m surface patches, a patch for each combination of a contour and a trajectory segment. The boundary of the sweep object is closed with additional patches at the base plane and at the cap plane (fig. 3.3). An example is shown on plate 2.

trajectory

segment

\ll-^"^"J~Jl-surface patch contour segment

Figure 3.3. Sweep-defined object.

Each surface patch is processed by the procedure Subdivide (algorithm 3.1). Subdi­ vide operates via the procedure Segment on two 'segment trees', one for the contour segment and one for the trajectory segment. A segment tree is a binary tree of which the root node corresponds to the whole segment, and the left and right sub-nodes of intermediate sub-nodes correspond to its left and right half segment. The pro­ cedure Segment passes references of these nodes to Subdivide and dynamically creates additional subnodes if requested by Subdivide. At each node of the segment tree, the coefficients of the spline segment are stored. The spline segment is subdi­ vided with the Catmull-subdivision algorithm [Catmull, 1974].

The function of Subdivide is to pass the node pointers of the segment trees to its subprocedures. Subdivide recursively calls itself four times until all segments satisfy the faceting tolerance. In procedure Flat, the plane equation of a plane through three of the corner points is calculated. If the midpoint and the fourth

(35)

Faceted modelling 29

procedure Subdivide(cep,tep:segmentpointer);

{cep and tep are pointers to segment t r e e for contour and t r a j e c t o r y Makepatch c a l c u l a t e s the four cornerpoints of a surface element with information from the segment t r e e

Flat i s a function that t e s t s whether the surface element i s within the faceting tolerance}

var p : surfaceelement;

c e p l , c e p 2 , t e p l , t e p 2 : segmentpointer;

begin

Makepatch(p,cep,tep); i f not F l a t ( p ) then

begin {subdivide patch in four subpatches}

Segment(cep,cepl,cep2); {if necessary subdivide segment} S e g m e n t ( t e p , t e p i , t e p 2 ) ; {and expand the segment t r e e s } S u b d i v i d e ( c e p l . t e p l ) ; {pass segment pointers to subpatch} Subdivide(cep2,tep1); S u b d i v i d e ( c e p l , t e p 2 ) ; Subdivide(cep2,tep2) end e l s e Output(p) end; {Subdivide} Algorithm 3.1. Subdivide.

corner point are within the tolerance distance, then the patch is approximated with a polygon, which in fact is a quadrilateral. Otherwise the patch is further subdivided. If the surface patch is not defined by a sweep procedure but as a bicubic parametric patch, then the standard Catmull-subdivision technique for patches is applied until the subpatches satisfy the same flatness criterion.

The linear approximation may destroy the integrity of the model in two ways. First, the integrity of the polygon mesh may be lost, but this can be repaired with the algorithm to be discussed in the following chapter. Second, the polygons are not guaranteed to be flat. This can only be overcome by describing the polygons by parametric surface definitions, but this requires additional processing for certain applications. In the following, the inaccuracy of the polygon (within the faceting tolerance) will be accepted, because in practical cases it does not lead to deficiencies.

3.3 Integrity checking*

As a result of the adaptive subdivision the density of surface elements (polygons) varies over the surface, and the length of edges of neighbouring surface elements

* This section was developed in cooperation with Matkku Tamminen, Helsinki University of Technology, Finland.

(36)

30 Faceted modelling 3 M 1 43 41 44 42 2

a. recursive subdivision b. subdivided patch

°; °2 %■*

o o o o

41 42 1,3 U,

DF = 11,2,3(41,1,2,43,1,4

c. quadtree representation d. DF - representation

Figure 3.4. Subdivision of a surface.

may differ. This may result in 'cracks' - small empty areas between adjoining ele­ ments (fig. 3.4). Cracks cannot be accepted in solid modelling, because they des­ troy the integrity of the surface.

Cracks can be mended by recognising and inspecting neighbouring elements. However, this requires an explicit tree structure to describe the state of the subdivi­ sion [Carlson, 1982], or a data structure for all the vertices linked into the subdivi­ sion network [Sabella and Wozny, 1983].

Since the number of elements may be large (tens of thousands of polygons), it is worthwhile to look at an alternative structure such as that depicted in fig. 3.5. In the proposed system, a surface processor produces a sequential list (file) of elements in a given order. The element list is then traversed in the same order, in the surface processor itself, or as a separate process by an integrity filter that adjusts the coordi­ nates of vertices (for instance M in fig. 3.4) to be identical in each adjoining ele­ ment. Ideally, the integrity filter should not require large and complex internal data structures.

(37)

Faceted modelling 31 patch —- patch subdivision integrity fitter surface elements

Figure 3.5. System structure based on an integrity filter.

Recursive surface subdivision is similar to the construction of a quadtree. Both divide space (parameter or image space) recursively until each leaf meets a certain criterion. The result of the process can be recorded explicitly in a 4-ary tree when the tree structure or interleaf processing is required. The quadtree need not be represented by the traditional explicit pointer based tree structure, but can also be represented with a linear quadtree [Kawaguchi and Endo, 1980]. In a linear quad­ tree the tree stmaure is implicit by the ordering of the nodes or the addresses of leaves in a sequential list.

In [Samet and Tamminen, 1984] efficient methods have been developed for traversing linear quadtree representations of two dimensional images to determine geometric properties such as perimeter and connected components. Here these algo­ rithms and data structures are applied to the integrity problem of recursive subdivi­ sion meshes. v-list 1 ;' v;:i

ii

^■■f^'-v;

w

:

m$

a. u

11

m

-hst

k

: . ; . ' ■ • : : : ' ■•••■ : • . / ! ' ; • • ; .•■•.v.-.'--.-..;! . ■-.. •... .i

IP

V/y/// .'/'■i ';}. ■.•'■'

Cytaty

Powiązane dokumenty

ment of the T rz inie Culture by the world of the European Early Bronze ivilization.. should be deemed insigni

Études de lettres francophones, Actes du CIEFT 2013 «Voyage(s)», le X e Colloque International d’Études Francophones Timişoara (Roumanie),. les 15—16 mars 2013”,

To begin, note that the interest is in explaining the evolution of non-cooperative (i.e., blight-gen- erating) property maintenance behaviour in a given urban area at the

џќіѡȱњќџюљǰȱјѡңџђȱћіђȱњюȱћіѐȱѤѠѝңљћђєќȱȱ

For sustainable market involvement, public transport infrastructure clients should stimulate market companies to individualize based on specific core competences and to deliver

Nawet czytelnik pobieżnie tylko zapoznany z epoką i dziejami nauczania filozofii w szkołach zapyta, dlaczego Autor ogranicza się tylko do wieku XVII, skoro „filozofia

The study labels on packages received expert, the appearance of objects that have been investigated during the examination, set their compliance objects that have

Uważny czytelnik książki Puchowskiego zastanowi się też nad zakresem lektur dzieł hi- storycznych, jakie autor przypisuje uczniom szkół jezuickich.. Brzmi to bardzo mo-