Unit 3
Unit 3
Computer Graphics Software and Data in Apparel Industry Introduction, the software
configuration of a graphics systems, functions of a graphics package, Database
structure & content, Geometric modeling 3D modeling, other CAD software feature.
Introduction
The CAD hardware would be useless without the software to support it. This chapter discusses
some of the issues and methods related to the software and accompanying data base for
interactive computer graphics and computer-aided design.
The graphics software is the collection of programs written to make it convenient for a user to
operate the computer graphics system. It includes programs to generate images on the CRT
screen, to manipulate the images, and to accomplish various types of interaction between the
user and the system. In addition to the graphics software, there may be additional programs for
implementing certain specialized functions related to CAD/CAM. These include design analysis
programs (e.g., finite-element analysis and kinematic simulation) and manufacturing planning
programs (e.g., automated process planning and numerical control part programming). This
chapter deals mainly with the graphics software.
The graphics software for a particular computer graphics system is very much a function of the
type of hardware used in the system. The software must be written specifically for the type of
CRT and the types of input devices used in the system. The details of the software for a stroke-
writing CRT would be different than for a raster scan CRT. The differences between a storage
tube and a refresh tube would also influence the graphics software. Although these differences
in software may be invisible to the user to some extent, they are important considerations in the
design of an interactive computer graphics system.
Newman and Sproull list six "ground rules" that should be considered in designing graphics
software:
This software configuration is illustrated in Figure 6.1. The central module is the application
program. It controls the storage of data into and retrieves data out of the application data base.
The application program is driven by the user through the graphics package.
The application program is implemented by the user to construct the model of a physical entity
whose image is to be viewed on the graphics screen. Application programs are written for
particular problem areas. Problem areas in engineering design would include architecture,
construction, mechanical components, electronics, chemical engineering, and aerospace
engineering. Problem areas other than design would include flight simulators, graphical display
of data, mathematical analysis, and even artwork. In each case, the application software is
developed to deal with images and conventions which are appropriate for that field.
The graphics package is the software support between the user and the graphics terminal. It
manages the graphical interaction between the user and the system. It also serves as the
interface between the user and the application software. The graphics package consists of input
subroutines and output subroutines. The input routines accept input commands and data from
the user and forward them to the application program. The output subroutines control the
display terminal (or other output device) and converts the application models into two-
dimensional or threedimensional graphical pictures.
The third module in the ICG software is the data base. The data base contains mathematical,
numerical, and logical definitions of the application models, such as electronic circuits,
mechanical components, automobile bodies, and so forth. It also includes alphanumeric
information associated with the models, such as bills of materials, mass properties, and other
data. The contents of the data base can be readily displayed on the CRT or plotted out in hard-
copy form. Section 6.6 presents a discussion of the data base for computer graphics.
The term "primitive" is often used in reference to graphic elements. We shall reserve the use of
this term to three-dimensional graphics construction. Accordingly, a primitive is a three-
dimensional graphic element such as a sphere, cube, or cylinder. In three-dimensional wire-
frame models and solid modeling, primitives are used as building blocks to construct the three-
dimensional model of the particular object of interest to the user.
2. Transformations
Transformations are used to change the image on the display screen and to reposition the item
in the data base. Transformations are applied to the graphic elements in order to aid the user in
constructing an application model. These transformation include enlargement and reduction of
the image by a process called scaling, repositioning the image or translation, and rotation. We
discuss two- and three dimensional transformations in Section 6.5.
4. Segmenting functions
Segmenting functions provide users with the capability to selectively replace, delete, or
otherwise modify portions of the image. The term "segment" refers to a particular portion of the
image which has been identified for purposes of modifying
it. The segment may define a single element or logical grouping of elements that can be
modified as a unit.
Storage-type CRT tubes are unsuited to segmenting functions. To delete or modify a portion of
the image on storage tube requires erasing the entire picture and redrawing it with the changes
incorporated. Raster scan refresh tubes are ideally suited to segmenting functions because the
screen is automatically redrawn 30 or more times per second anyway. The image is
regenerated each cycle from a display file, a file used for storage that is part of the hardware in
the raster scan CRT. The segment can readily be defined as a portion of that display file by
giving it a name. The contents of that portion of the file would then be deleted or altered to
execute the particular segmenting function.
The input functions should be written to maximize the benefits of the interactive feature of ICG.
The software design compromise is to find the optimum balance between providing enough
functions to conveniently cover all data entry situations without inundating the user with so many
commands that they cannot be remembered. One of the goals that are sought after by software
designers in computer graphics is to simplify the user interface enough that a designer with little
or no programming experience can function effectively on the system.
Our principal concern is with the contents of the data base and with its organization. Foley and
Van Dam - define the basic ingredients of the application model which must be carried in the
data base. The following model structure is patterned after their suggested data base
organization:
The list represents a building-block approach to model formulation, with items in category 1
being the most elementary ingredients. They are combined to form the components in category
2, which in turn are used to construct category 3, and so forth. The model structure consists of
both data and procedures to connect, describe, and analyze the model.
The model data base can be organized in various ways. This depends on the type of model
(mechanical, electrical, etc.) and the preference of the CAD system designer. Some systems
lean toward more complete descriptions of the model stored explicitly as data. This requires
more storage space. Other systems are designed to store a minimum of data but with more
complete procedures so that the model can be recomputed when needed. This saves on
storage space, but requires more computation time.
One possible data structure involves storing the coordinates of the geometry, together with
other information which might be required to more completely define the model or to use certain
application programs (e.g., engineering analysis or numerical control part programming). There
are disadvantages to this type of data structure. For example, consider the definition of a
cylinder. The definition might consist of a line segment, parallel to the y axis, and rotated about
that axis to form the cylinder. The data record for this component would consist of the points for
the line segment and an axis of rotation. The computer can generate an image of the cylinder
for display purposes, but it does not have the entire solid cylinder data elements stored in the
record. It would be difficult for the computer system to determine that the cylinder was a solid
object. The characteristic of being solid might be important in a subsequent analysis for
interference checking when the cylinder was assembled along with other solid components.
Alternative forms for the data base include the graph-based model. The graph-based model,
illustrated in Figure 6.6 for a tetrahedron, is composed of a series of points and lines which
establish relationships among the points, edges, and surfaces of the geometric element. Only
the points (vertices) are contained as spatial data in the record. However, the relationships that
connect edges to vertices, faces to edges, and the solid to faces are also recorded. This turns
out to be a compact way to define a solid.
Boolean operations can be used to construct the geometric model. The process is illustrated in
Figure 6.7 and is sometimes referred to by the term Boolean modeling. The solid model in part
(a) of the figure is formed by the intersection of the compliment of the cylinder C with the union
of rectangular solid A and triangular prism B. Putting this more concisely, the object in (a) is
equal to
C(A + B)
Part (b) of the figure shows the three elements A, B, and C in cross-sectional view.
Geometric modeling 3D modeling
However, there was a fundamental shortcoming of these early systems. Although they were
able to reproduce high- quality engineering drawings efficiently and quickly, these systems
stored in their data files a two-dimensional record of the drawings. The drawings were usually of
three-dimensional objects and it was left to the
human beings who read these drawings to
interpret the three dimensional shape from the
two-dimensional representation. The early CAD
systems were not capable of interpreting the
three-dimensionality of the object. It was left to the
user of the system to make certain that the two-
dimensional representation was correct (e.g.,
hidden lines removed or dashed, etc.), as stored
in the data files.
The importance of this three-dimensional capability in interactive computer graphics should not
be underestimated. To illustrate the limitations of a two dimensional line drawing, consider
Figure 6.9. It could represent any of a number of possible geometric shapes. Even a three-
dimensional perspective drawing, as illustrated in Figure 6.10, does not always uniquely define
the solid shape of the object. It is important that the graphics system work with three-
dimensional shapes in developing the model of an object.
Wire-Frame models
Most current-day graphics systems use a form of modeling called wire-frame modeling. In the
construction of the wire-frame model, the edges of the objects are shown as lines. For objects in
which there are curved surfaces, contour lines can be added to indicate the contour. The image
assumes the appearance of a frame constructed out of wire—hence the name "wire-frame"
model.
There are limitations to the models which use the wire-frame approach to form the image.
These limitations are, of course,
especially pronounced in the case. of
three-dimensional objects. In many
cases, wire-frame models are quite
adequate for two-dimensional
representation.
There are also limitations with the wire-frame models in the way many CAD systems define the
model in their data bases. For example, there might be ambiguity in the case of a surface
definition as to which side of the surface is solid. This type of limitation prevents the computer
system from achieving a comprehensive and unambiguous definition of the object.
Solid models
An improvement over wire-frame models, both in terms of realism to the user and definition to
the computer, is the solid modeling approach. In this approach, the models are displayed as
solid objects to the viewer, with very little risk of misinterpretation. When color is added to the
image, the resulting picture becomes strikingly realistic. It is anticipated that graphics systems
with this capability will find a wide range of applications outside computer-aided design and
manufacturing. These applications will include color illustrations in magazines and technical
publications, animation in movie films, and training simulators (e.g., aircraft pilot training)
There are two factors which promote future widespread use of solid modelers (i.e., graphics
systems with the capability for solid modeling). The first is the increasing awareness among
users of the limitations of wire-frame systems. As powerful as today's wire-frame-based CAD
systems have become, solid model systems represent a dramatic improvement in graphics
technology. The second reason is the continuing development of computer hardware and
software which make solid modeling possible. Solid modelers require a great deal of
computational power, in terms of both speed and memory, in order to operate. The advent of
powerful, low-cost minicomputers has supplied the needed capacity to meet this requirement.
Developments in software will provide application programs which take advantage of the
opportunities offered by solid modelers. Among the possibilities are more highly automated
model building and design systems, more complete three-dimensional engineering analysis of
the models, including interference checking, automated manufacturing planning, and more
realistic production simulation models.
Two basic approaches to the problem of solid modeling have been developed:
1. Constructive solid geometry (CSG or C-rep), also called the building block approach
2. Boundary representation (B-rep)
The CSG systems allow the user to build the model out of solid graphic primitives, such as
rectangular blocks, cubes, spheres, cylinders, and pyramids. This building-block approach is
similar to the methods described in Section 6.4 except that a solid three-dimensional
representation of the object is produced. The most common method of structuring the solid
model in the graphics data base is to use Boolean operations, described in the preceding
section.
The boundary representation approach requires the user to draw the outline or boundary of the
object on the CRT screen using an electronic tablet and pen or analogous procedure. The user
would sketch the various views of the object (front, side, and top, more views if needed),
drawing interconnecting lines among the views to establish their relationship. Various
transformations and other specialized editing procedures are used to refine the model to the
desired shape.
All of these features are helpful in reducing the time required to complete the design and
drafting process.
In most CAD systems, an interface is generally provided to various high level programming
languages such as FORTRAN. This interface allows the development of application programs
for analysis purposes. It also provides the opportunity to utilize programs and routines written at
other facilities. This interface allows a wide variety of powerful design analysis and
manufacturing planning procedures to be applied to the product development.
Experience has demonstrated that the benefits obtained from an integrated CAD/CAM data
base are far greater than those which can be realized from applying CAD and CAM as separate
technologies. There is a significant overlap in the data base required for design and that which
is required for manufacturing. Bridging the gap that has traditionally existed between design and
manufacturing is a critical objective of CAD/CAM.