Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

CAD/CAM

UNIT -I
Syllabus:
Introduction: Brief review of conventional design process, computers in design and
manufacturing, product cycle in light of CAD/CAM.

Computer Graphics: Raster Scan Graphics coordinate system, transformation of geometry,


3D transformations, mathematics of projections, line clipping, hidden surface removal,
database requirements for CAD/CAM systems.

Course objectives:

 To present the role of computers and technology that drives the modern industry.

Course outcomes:

Upon successful completion of chapter, the students will be able

 apply principles of computer graphics for product design.

Computer Aided Design (CAD):


Computer Aided Design can be defined as the use of computer systems to assist in the
creation, modification, analysis, or optimization of a design.

Computer Aided Manufacturing (CAM):


Computer Aided Manufacturing can be defined as the use of computer systems to plan,
manage, and control the operations of a manufacturing plant through either direct or indirect
computer interface with the plant’s production resources.

As per the definition of the Computer Aided Manufacturing the role of computers in
manufacturing can be classified into two broad categories:

1. Computer Monitoring and Control

2. Manufacturing Support Systems


Computer Monitoring and Control:
These are the direct applications in which the computer is connected directly to the
manufacturing process for the purpose of monitoring and control.

The computer monitoring and control can be separated into monitoring applications and
control applications. Computer process monitoring involves a direct computer interface with
the manufacturing process for the observing the process and associated equipment and
collecting data from the process. Here the process control remains in the hands of operator.

Figure: Computer Process Monitoring

In the computer monitoring and control the flow of data between the process and the
computer is in one direction only, from the process to the computer. In control, the computer
interface allows for a two-way flow of data. Signals are transmitted from the process to the
computer, just as in the case of computer monitoring. In addition, the computer issues
command signals directly to the manufacturing process based on control algorithms
contained in its software.

Figure: Computer Process Monitoring and Control

Manufacturing Support Systems:


The computer process interface is direct for the purpose of process monitoring and control.
There are some applications in manufacturing where computer process interface is indirect
and it serves a supporting role in the manufacturing. In these applications the computer is not
linked directly to the manufacturing processes. Instead the computer is used “off-line” to
provide plans, schedules, forecasts, instructions and information by which the firm’s
production resources can be managed more effectively.

Figure: CAM for Manufacturing Support

In all the applications presented human beings are presently required in the application either
to provide input to the computer programs or to interpret the computer output and implement
the required action. Some examples of CAM for manufacturing support are:

 Numerical control part programming by computers. Control programs are


prepared for automated machine tools.

 Computer – automated process planning. The computer prepares a listing of the


operation sequence required to process a particular product or component.

 Computer– generated work standards. The computer determines the time standard
for a particular production operation.

 Production Scheduling. The computer determines an appropriate schedule for


meeting production requirements.

 Material requirements planning. The computer is used to determine when to order


raw materials and purchased components and how many should be ordered to achieve
the production schedule.

 Shop floor control. In this CAM application, data are collected from the factory to
determine the progress of the various production shop orders.
The Product Cycle:
It is appropriate to examine the various activities and functions that must be accomplished in
the design and manufacture of a product to appreciate the scope of CAD/CAM in industry.
These activities and functions are referred as Product Cycle.

Figure: Product Cycle (design and manufacturing)

The product is driven by customers and market which demand the product. Depending on the
particular customer group, there will be a difference in the way of product cycle is activated.
In some cases, the design functions are performed by the customer and the product is
manufactured by a different firm. In other cases, design and manufacturing is accomplished
by same firm. However, the product cycle begins with a concept, an idea for a product. This
concept cultivated, refined, analyzed, improved, and translated into a plan for the product
through the design engineering process. The plan is documented by drafting a set of
engineering drawings showing the product is made and providing a set of specifications
indicating how the product should perform. With this stage the design activities in the
product cycle ends.

The next activities in the product cycle involve the manufacture of a product. A process plan
is formulated which specifies the sequence of production operations required to make the
product. New equipment and tools must sometimes be acquired to produce the new product.
Scheduling provides a plan that commits the company to the manufacture of certain
quantities of the product by certain dates. Once all these plans are formulated, the product
goes into the production, followed by quality testing, and delivery to the customer.
The impact of CAD/CAM is manifest in all of the different activities in the product cycle.
Computer Aided Design and Automated Drafting are utilized in the conceptualization,
design, and documentation of the product. Computers are used in the process planning and
scheduling to perform these functions more efficiently. Computers are utilized production to
monitor and control the manufacturing operations. In quality control, computers are used to
perform inspections and performance tests on the product and its components.

Figure: Product Cycle revised with CAD-CAM overlaid

Reasons for Implementing the CAD Systems:


1. To increase the productivity of the designer

2. To improve the quality of design.

3. To improve communications.

4. To create database for manufacturing.

The Design Process:


The process of designing a product is characterized by Shigley. It is an iterative procedure,
which consists of six identifiable steps or phases:
1. Recognition of need

2. Definition of problem

3. Synthesis

4. Analysis and optimization

5. Evaluation

6. Presentation

Figure: The general design process

Recognition of need involves the realization by someone that a problem exists for which
some corrective action should be taken. This might be the identification of some defect in a
current machine design by an engineer or the perception of a new product marketing
opportunity by a salesperson. Definition of the problem involves a thorough specification of
the item to be designed. This specification includes physical and functional characteristics,
costs, quality, and operating performance.
Synthesis and analysis are closely related and highly iterative in the design process. A certain
component or subsystem of the overall system is conceptualized by the designer, subjected to
analysis, improved through this analysis procedure, and redesigned. The process is repeated
until the design has optimized within the constraints imposed on the designer. The
components and subsystems are synthesized into the final overall system in a similar iterative
manner.

Evaluation is concerned with measuring the design against the specifications established in
the problem definition phase. This evaluation often requires the fabrication and testing of
prototype model to assess operating performance, quality, reliability and other criteria. The
final phase in the design process is the presentation of the design. This includes
documentation of the design by means of drawings, material specifications, assembly lists,
and so on.

Mechanical design includes the drawing of the complete product as well as its components
and subassemblies, and the tools and fixtures required to manufacture the product. Electrical
design is concerned with the preparation of circuit diagrams, specification of electronic
components, and so on. In engineering discipline, the approach has traditionally been to
synthesize a preliminary design manually and then to subject that design to some form of
analysis. The analysis may involve sophisticated engineering calculations or it may involve a
very subjective judgement of the aesthetic appeal proposed by the design. The analysis
procedure identifies certain improvements that can be made in the design.

As stated previously, the process is an iterative process. Each iteration yields an improvement
in the design. The trouble with this iterative process is that it is time consuming. Many
engineering labour hours are required to complete the design process.

The Application of Computers for Design:


The various design related tasks which are performed by a modern computer aided design
system can be grouped into four functional areas:

1. Geometric modelling

2. Engineering analysis

3. Design review and analysis

4. Automated drafting
Figure: Application of computers to the design process.

Geometric modelling:
In computer aided design, geometric modelling is concerned with the computer compatible
mathematical description of the geometry of an object. The mathematical description allows
the image of the object to be displayed and manipulated on a graphics terminal through
signals from the CPU of the CAD system. The software that provides geometric modelling
capabilities must be designed for efficient use both by the computer and the human designer.

There are several ways of representing an object in geometric modelling. The basic form uses
wire frames to represent the object. In this form the object is displayed by interconnecting
lines. The wire frame geometric modelling is classified into three types based on the
capability of the ICG system. The three types are:

a. 2D : Two dimensional representations is used for flat object.

b. 2 1 D: This goes somewhat beyond the 2D capability by permitting a three -


2
dimensional object to be represented as long as it has no side wall details.

c. 3D : This allows for full three – dimensional modelling of a more complex


geometry.
The most advanced method of geometric modelling is solid modelling in three dimensions.
This method typically uses solid geometry shapes called primitives to construct the object.
Another feature of some CAD systems is colour graphics capability. By means of colour, it is
possible to display more information on the graphical screen. Eg: Components in an
assembly, differentiating dimensions from the outline.

Engineering Analysis:

In the formulation of nearly any engineering design project, some type of analysis is required.
The analysis may involve stress-strain calculations, heat-transfer computations, or the use of
differential equations to describe the dynamic behaviour of the system being designed. Based
on the situations it is necessary that a specific program be developed internally by the
engineering analysis group to solve a particular design problem or commercially available
general-purpose programs can be used to perform the engineering analysis.

The analysis on any system may be of two types:

a. Analysis of mass properties.

b. Finite element analysis.

Analysis of mass properties:


The analysis of mass properties is the analysis feature of a CAD system provides properties
of a solid object being analysed, such as the surface area, weight, volume, centre of gravity,
and moment of inertia.

Finite element analysis:


With this technique, the object is divided into a large number of finite elements which from
an interconnecting network of concentrated nodes. By using a computer with significant
computational capabilities, the entire object can be analyzed for stress – strain, heat transfer
and other characteristics by calculating the behaviour of each node. By determining the
interrelating behaviours of all the nodes in the system, the behaviour of the entire object can
be assessed.

Design Review and Evaluation:


Semi automatic dimensioning and tolerancing routines which assign size specifications to
surfaces indicated by the user, help to reduce the possibility of dimensioning errors. The
designer can zoom in on part design details and magnify the image on the graphics screen for
close scrutiny. The designer can check for interference in assembly of the component. This
involves the analysis of an assembled structure in which there is a risk that the components of
the assembly may occupy the same space. This increases the accuracy of the design.

One of the most interesting evaluation features available on some computer aided design
systems is kinematics. The available kinematic packages provide the capability to animate the
motion of simple designed mechanisms such as hinged components and linkages. This
capability enhances the designers visualization of the operation of the mechanism and helps
to ensure against interference with other components. One of the commercial software
package to perform the kinematic analysis is ADAMS (Automatic Dynamic Analysis of
Mechanical Systems) , developed by University of Michigan.

Automated Drafting:
Automated drafting involves the creation of hard – copy engineering drawings directly from
the CAD data base. Some of the graphics features of computer aided design systems lend
themselves especially well to the drafting process. These features include automatic
dimensioning, generation of cross hatched areas, scaling of the drawing, and the capability to
develop sectional views and enlarged views in particular part details. Most CAD systems are
capable of generating as many as six views of the part. CAD systems can increase
productivity in the drafting function roughly five times over manual drafting.

Figure: Engineering drawing with four views generated automatically by a CAD system
Creating the Manufacturing Data Base:
In the conventional manufacturing cycle practiced for so many years in industry, engineering
drawings were prepared by design draftsmen and then used by manufacturing engineers
develop the process plan. The activities involved in designing the product were separated
from the activities associated with process planning. This was both time consuming and
involved supplication of effort by design and manufacturing personnel.

In an integrated CAD/CAM system a direct link is established between product design and
manufacturing. Computer – based systems have been developed which create much of the
data and documentation required to plan and manage the manufacturing operations for the
product. The manufacturing data base is an integrated CAD/CAM data base. It includes all
the data on the product generated during design (geometry data, bill of materials and parts
list, material specifications, etc.) as well as additional data required for manufacturing, much
of which is based on the product design.

Figure: Desirable relationship of CAD/CAM database to CAD and CAM

Benefits of Computer Aided Design:


1. Productivity improvement in Design

2. Shorter lead times

3. Improved Design Analysis

4. Fewer design errors

5. Greater accuracy in design calculations


6. Standardization of design, drafting, and documentation procedures

7. Improved procedures for engineering changes

8. Drawings are more understandable.

Benefits of Computer Aided Manufacturing:

1. Greater design freedom

2. Increased productivity

3. Greater operating flexibility

4. Shorter lead times

5. Reduced maintenance

6. Reduced scrap and rework

7. Better management control

Raster Scan Graphics Coordinate Systems:


In CAD three types of coordinate systems are needed in order to input, store and display
model geometry and graphics. These are the Model Coordinate System (MCS), the World
Coordinate System (WCS) and the Screen Coordinate System (SCS).

Model Coordinate System (User Coordinate System):


The MCS is defined as the reference space of the model with respect to which all the model
geometrical data is stored. The origin of MCS can be arbitrary chosen by the user.

Figure: Model Coordinate System


World Coordinate System:
As discussed above every object have its own MCS relative to which its geometrical data is
stored. In case of multiple objects in the same working space then there is need of a World
Coordinate System which relates each MCS to each other with respect to the orientation of
the WCS. It can be seen by the picture shown below.

Figure: Different objects in reference with WCS

Screen Coordinate System (Display Coordinate System):


In contrast to the MCS and WCS the Screen Coordinate System is defined as a two
dimensional device-dependent coordinate system whose origin is usually located at the lower
left corner of the graphics display as shown in the picture below. A transformation operation
from MCS coordinates to SCS coordinates is performed by the software before displaying the
model views and graphics.

Figure: Screen Coordinate System

Database for CAD/CAM:


A database is defined as an organized collection of graphics and non-graphics data stored on
secondary storage in the computer. It could, therefore, be viewed as the art of storing or the
implementation of data structure into the computer. The objective of the database is to collect
and maintain data in central storage so that it will be available for operations and decision
making. Advantages of centralized database
1. Eliminate Redundancy
2. Enforce Standards
3. Apply Security Restrictions
4. Maintain Integrity
5. Balance Conflicting Requirements
Functional Requirements of CAD/CAM Database:
1. Multiple engineering applications from conceptual design to manufacturing operations
2. Dynamic modification and extension of the database and its associativity
3. The iterative nature of design. This is not common in business data processing.
CAD/CAM data base management systems must support the tentative, iterative and
evolutionary nature of the design process
4. Design versions and levels of detail. CAD databases must provide a capability for
storage and management of multiple design solutions that may exist for a particular
design. There is a seldom a unique solution to a design problem and there may exist
several optimal solutions.
5. Concurrent and multiple users must be supported from the database. Large design
projects usually involve multiple designers working simultaneously on multiple aspects of
a project.
6. Temporary database support. Due to the iterative nature of design, earlier generated
data may not be committed to the database until the design process is completed.
7. Free design sequence. The database system should not impose constraints on the designer
to follow because different designs require different sequences.
8. Easy access. Application programs requiring data from a CAD/CAM database should not
require extensive knowledge of the database structure to extract the data needed. This is
important in customizing CAD/CAM system for specific design and manufacturing
procedures.
Transformations of Geometry:
The geometry traditionally followed is an Euclidean geometry. In the traditional sense we
follow the cartesian coordinate system specified by the X, Y and Z coordinate directions. The
three axes are mutually perpendicular and would follow the right hand system.

in handling of geometrical information, many a times it becomes necessary to transform the


geometry. The transformations actually convert the geometry from one coordinate system to
the other.
The main types of pure transformations with which we are likely to come across are the
following.

1. Translation
2. Scaling
3. Reflection or Mirror
4. Rotation
A point in space can be represented by its coordinate system (x , y , z) from the datum. The
same can be represented by a vector starting from the origin of the coordinate system as
shown below:

P   x, y , z 

 x
 P    y 
 z 

Translation:
This moves a geometric entity in space in such a way that the new entity is parallel at all
points to the old entity.

Figure: Translation of a Group of Points (Plane Figure)

Let us consider a point on the object represented by P which is translated along X and Y axes
by dX and dY to a new position P*. The new coordinates after transformation are given by the
following equation:

P*   x* , y*  (1)

x*  x  dX (2)

y *  y  dY (3)

Substituting the equation (2) and (3) in equation (1) we get,


 x*   x  dX   x   dX 
 P*    *        (4)
 y   y  dY   y   dY 

This is normally used in the CAD systems as MOVE command.

Scaling:
Scaling is the transformation applied to change the scale of an entity. To achieve scaling the
original coordinates would be multiplied uniformly by the scaling factor.

Figure: Scaling of a Plane Figure

P*   X * , Y *    S x  X , S y  Y  (5)

 Sx 0  x
 P*    (6)
0 S y   y 

 P*   Ts  P  (7)

Where,

S 0
Ts    0x S y 

Since, the scaling factors can be individually applied, there is a possibility to have differential
scaling when S x  S y . Normally in the CAD systems uniform scaling is allowed for object
manipulation. In this case of zoom facility in graphics systems, uniform scaling is applied.
Zooming is only a display attribute and is applied only to the display and not to the actual
geometric database.
Reflection or Mirror:
Reflection or mirror is a transformation, which allows a copy of the object to be displayed
while the object is reflected about a line or a plane. Typical example shows a reflection about
X axis (a), Reflection about Y axis (b) and is about the X and Y axis or about the origin.

Figure: Possible Reflection (Mirror) Transformations

The transformation in this case is that the axes coordinates will get negated depending on the
reflection required.

Figure: Example for Reflection Transformations

P*   X * , Y *    X , Y  (8)

1 0   x 
 P*      (9)
0 1  y 

 P*   Tm  P  (10)

Where,
1 0 
Tm    
0 1

Thus the general transformation matrix will be

 1 0 
M    
 0 1

Rotation:
Rotation is another important geometric transformation. The final position and orientation of
a geometric entity is decided by the angle of rotation   and the base point about which the
rotation, is to be done

Figure: Rotation Transformation

To develop the transformation matrix, consider a point P located in the XY plane, being
rotated in the counter clock wise direction to the new position, P* by an angle  . The new
position P* is given by

P*   x* , y* 
(11)

The original position of the point is specified by


x  r cos 
(12)

y  r sin 
(13)

The new position, P* is specified by

x*  r cos(   )
(14)
 r cos  cos   r sin  sin 

 x cos   y sin 

y*  r sin(   )
(15)

 r sin  cos   r cos  sin 

 x sin   y cos 

This can be written in a matrix form as

 x*  cos   sin    x 
 P*    *   
 y   sin  cos    y  (16)

 P*   TR  P 

Where,

cos   sin  
TR   
 sin  cos  

Concatenation of Transformations:
Many atimes it becomes necessary to combine the aforementioned individual transformations
in order to achieve the required results. In such case the combined transformations matrix can
be obtained by multiplying the respective transformation matrices. However, care should be
taken that the order of the matrix multiplication be done in the reverse way as that of the
transformations as follows

T   Tn Tn1 Tn 2 ............T3 T2 T1 


Homogeneous Representations:
In order to concatenate the transformations, all the transformation matrices should be
multiplicative type. The translation matrix is vector additive while all others are matrix
multiplications. The following form could be used to convert the translation into a
multiplication form:

 x*  1 0 dX   x 
 
 P*    y*   0 1 dY   y  (17)
  
 1  0 0 1   1 
 

The following are the homogeneous transformations for the 4 basic transformations in 2D:
1 0 dX 
 Translation : 0 1 dY 
 
0 0 1 
Sx 0 0
 Scaling : 0 Sy 0
 
 0 0 1 
 1 0 0 
 Reflection :  0 1 0 
 
 0 0 1 
cos   sin  0
 Rotation :  sin  cos  0
 
 0 0 1 
3D Transformations:
The transformation matrix will be now 4 x 4. The following are the transformations matrices
to be used for this purpose.

1 0 0 dX 
0 1 0 dY 
 Translation : T   
0 0 1 dZ 
 
0 0 0 1 
 S x 0 0 0
0 S 0 0 
 Scaling : T    y

0 0 S z 0
 
 0 0 0 1
 1 0 0 0 
 0 1 0 0 
 Reflection : T    
0 0 1 0 
 
 0 0 0 1
 cos   sin  0 0
 sin  cos  0 0 
 Rotation about Z –axes (XY Plane) : T   
0 0 1 0
 
 0 0 0 1
1 0 0 0
 0 cos   sin  0 
 Rotation about X – axes (YZ Plane) : T   
0 sin  cos  0
 
0 0 0 1
 cos  0 sin  0
 0 1 0 0 
 Rotation about Y – axes (ZX Plane) :   
T 
 sin  0 cos  0
 
 0 0 0 1
Mathematics of Projections:
Typically a view definition requires a view origin, view port (or view window) and a viewing
direction as shown in the figure:

Figure: View Definition

The viewing plane is perpendicular to the viewing direction and it is same as the projection
plane. The viewing direction is same as the projectors. The viewing port is or view window
defines the boundaries against which the view is clipped.

A view has a viewing coordinate system (VCS). It is a three – dimensional system with Xv
axis horizontal pointing to the right and the Yv axes vertical pointing upward. The zv axis
defines the viewing direction.

To obtain views of a model, the viewing plane, the XvYv plane, is made coincident with XY
plane of the Model Coordinate System (MCS). Model views now a matter of rotating the
model with respect to the VCS axes until the desired model plane coincides with the viewing
plane followed by projecting the model onto that plane. Thus a view model is generated in
two steps:

 Rotate the model properly


 Project it.
These steps are usually performed when the user follows the view definition syntax on a
given CAD/CAM systems. The following figure shows the relationship between the MCS
and VCS for typical views of a geometric model.
Figure: Relation between MCS and VCS

For the front view, the XY and XvYv plane are identical. To obtain this view, we simply
project the geometry on to the viewing plane. For the top view, we must rotate the model
about the Xv axis by 900 so that the XZ plane coincides with the XvYv plane. The other views
can be obtained in a similar fashion.

Orthographic Projections:
An orthographic projection of a model is obtained by setting to zero the coordinate value
corresponding to the MCS axis that coincides with direction of projection after the model is
rotation. To obtain the front view, we only need to set z = 0 for all the key points of the
model.

1 0 0 0
0 1 0 0 
T   
0 0 0 0
 
0 0 0 1

 Pv   T  P 
Where Pv is the point expressed in the VCS. For the front view. It gives x = xv and y = yv
For the top view, the view model and its MCS are rotated by 900 about the Xv axis followed
by setting the y coordinate of the resulting points to zero. The y coordinate is the one to set to
zero because the Y axes of the MCS coincide with the projection direction. In this case the
T  becomes
1 0 0 0
0 0 1 0 
T   
0 0 0 0
 
0 0 0 1

This gives xv = x and yv = -z.

The right view shown in the figure can be obtained by rotating the model and its MCS about
the Yv axis by -900 and setting the x coordinate to zero. Thus,

0 0 1 0
0 1 0 0 
T   
0 0 0 0
 
0 0 0 1

This gives xv = -z and yv = y

Isometric View:
To obtain the isometric view the model and its MCS are customarily rotated an angle
  450 about the Yv axis followed by a rotation   35.260 about the Xv axis. The values
of these angles are based on the fact that the three axes are foreshortened equally in the
isometric view. This can be explained as follows. The two rotations give applying this
equation to transform the unit vectors in the X direction 1 0 0 1 , in the Y direction
T

0 1 0 1
T

 Pv   T  P 

1 0 0 0   cos  0 sin  0  x 
0 cos   sin  0   0 1 0 0  y 

0 sin  cos  0    sin  0 cos  0  z 
   
0 0 0 1  0 0 0 1  1 
The signs of the rotation angles  and  result in four possible orientations of isometric
views. The most common orientation where   450 and   35.260 . Substituting these
values we get

 0.5253 0 0.8509 0 
 0.5498 0.7632 0.3394 0 
T    
0.6494 0.6461 0.4009 0 
 
 0 0 0 1

Clipping:
Clipping is a very important element for displaying graphical images. This helps in
discarding a part of the geometry outside the viewing window, such that all the
transformations that are to be carried out for zooming and panning of the image on the screen
are applied only on the necessary geometry. This improves the response of the system.

Figure: Reflection Transformations about an Arbitrary Line

The image shown inside the window with dark lines is the only part that will be visible. All
geometry outside this window will be clipped (only foe display purpose).

Cohen Sutherland Clipping Algorithm in 2D:


In this method all the lines are classified to see if they are in, out or partially in the window
by doing an edge test. The end points of the line are classified as to where they are with
reference to the window by means of a 4 digit binary code.
Figure: The 4 Digit Coding of the Line End Points for Clipping

The code is termed as TBRL. The code is identified as below:

T = 1 if point is above top of window

= 0 otherwise

B = 1 if point is below the window

= 0 otherwise

R = 1 if point is above right of window

= 0 otherwise

L = 1 if point is above left window

= 0 otherwise

Having assigned the 4 digit code, the system first examines if the line is fully in or out of the
window by the following conditions.

 The line is visible if both the region codes are “0000”,


 The line is not visible if the bitwise logical AND of the codes is not “0000”.
 The line is a candidate for clipping if the bitwise logical AND of the region codes is
“0000”
The clipping procedure described above produces a result, which can mean more than one
geometry.
Figure: Identical Line Clipping of Two Different Geometries

Hidden Surface Removal:


Removing hidden lines and surfaces greatly improves the visualization of the objects.

Z - Buffer (Depth Buffer):


This method utilizes the principle for each of the pixel locations, only that point which has
the smallest Z -depth, is displayed. For this purpose it construct two arrays.

Z (x , y) the dynamic nearest Z - Depth of any polygon face currently examined


corresponding to the (x , y) pixel coordinates.

I (x , y) the final output color intensity for each pixel which gets modified as the algorithm
scans through all the faces that have been retained after the back face removal algorithm.

The first face is projected on to the viewing plane and Z (x , y) and I (x , y) arrays are filled
with the Z - depth and color of the face, next polygon is projected and its Z - depth for each
pixel location is compared with the corresponding one that is stored in Z (x , y). If the new Z
-depth is smaller, then it replaces the existing value, while its color is stored in the
corresponding position in I (x , y). This process is repeated for all the faces. Thus the image
stored in I (x , y) is the correct image, accurate to the nearest pixel with all the hidden
surfaces removed.

Figure: Z – Buffer Method – S1 is closer to the observer (x , y) than S2

You might also like