Sie sind auf Seite 1von 76

COMPUTER AIDED

DESIGN
(As per ANNA UNIVERSITY Revised Syllabus)

(Vth Semester Mechanical Engineering)

Dr. S. Ramachandran, M.E.., Ph.D.,


Professor and Research Head,,
Faculty of Mechanical Engineering
Sathyabama University
Jeppiaar Nagar, Chennai - 600 119

P. Vijayalakshmi

Y.V.S. Karthick

Bikash Kumar Thakur

AIR WALK PUBLICATIONS


(Near All India Radio)
80, Karneeshwarar Koil Street,
Mylapore, Chennai - 600 004.
Ph.: 2466 1909, 94440 81904
Email: aishram2006@gmail.com
www.airwalkpublications.com
First Edition: June, 2015

© All Rights Reserved by the Publisher

This book or part thereof should not be reproduced in


any form without the written permission of the publisher.

ISBN: 978 - 93 - 84893 - 12 - 5

Books will be door delivered after payment into AIR WALK PUBLICATIONS
A/c No. 801620100001454 (IFSC: BKID0008016) Bank of India, Santhome
branch, Mylapore, Chennai - 4 (or)

S.Ramachandran, A/c.No.482894441 (IFSC:IDIB000S201), Indian Bank,


Sathyabama University Branch, Chennai - 600119.

Typeset by: aksharaa muthra aalayam, Chennai - 18. Ph.: 044-2436 4303
Contents C.3

SYLLABUS
ME6501 COMPUTER AIDED DESIGN

UNIT I Fundamentals of Computer Graphics 9


Product cycle- Design process- sequential and
concurrent engineering- Computer aided design – CAD
system architecture- Computer graphics – co-ordinate
systems- 2D and 3D transformationshomogeneous
coordinates - Line drawing -Clipping- viewing
transformation

UNIT II Geometric Modeling 9


Representation of curves- Hermite curve- Bezier
curve- B-spline curves-rational curves-Techniques for
surface modeling – surface patch- Coons and bicubic
patches- Bezier and B-spline surfaces. Solid modeling
techniques- CSG and B-rep

UNIT III Visual Realism 9


Hidden – Line-Surface-Solid removal algorithms –
shading – colouring – computer animation.

UNIT IV Assembly of Parts 9


Assembly modelling – interferences of positions and
orientation – tolerance analysis-massproperty calculations –
mechanism simulation and interference checking.

UNIT V CAD Standards 9


Standards for computer graphics- Graphical Kernel
System (GKS) - standards for exchangeimages- Open
Graphics Library (OpenGL) - Data exchange standards -
IGES, STEP, CALSetc. - communication standards.

Total : 45 Periods
C.1 Computer Aided Design

Contents

I. COMPUTER AIDED DESIGN (CAD)

1.1 Introduction. ................................................................. 1.1


1.2 Product Cycle.... ........................................................... 1.2
1.2.1 Typical product cycle ................................... 1.3
1.3 Design Process.. ........................................................... 1.5
1.4 Sequential Engineering ............................................... 1.9
1.5 Concurrent Engineering .............................................. 1.10
1.5.1 Characteristics of concurrent engineering . 1.11
1.5.2 Need for implementation of concurrent
engineering .. ........................................................... 1.12
1.6 Comparison of Sequential And Concurrent
Engineering ........ ................................................................. 1.12
1.7 Computer Aided Design .............................................. 1.15
1.7.1 Why should we go for CAD?...................... 1.15
1.7.2 Factors considered for selecting CAD
system .... ................................................................. 1.16
1.7.3 Role of computer in CAD ........................... 1.16
1.8 Benefits of CAD ........................................................... 1.18
1.9 Engineering Applications of CAD.............................. 1.19
1.10 Other applications of CAD ....................................... 1.21
1.11 Computer Graphics .................................................... 1.23
1.12 Coordinate Representation System.......................... 1.25
1.12.1 Cartesian coordinate system ..................... 1.25
1.12.2 World coordinate system ........................... 1.26
1.12.3 Normalised coordinate system .................. 1.26
Contents C.2

1.12.4 Device coordinate system........................... 1.27


1.13 Two Dimensional Transformation............................ 1.28
1.13.1 Translation .................................................. 1.28
1.13.2 Scaling . ....................................................... 1.34
1.13.3 Rotation ....................................................... 1.38
1.14 Three Dimensional Transformations ....................... 1.41
1.14.1 Translation .................................................. 1.41
1.14.2 Scaling . ....................................................... 1.41
1.14.3 Rotation ....................................................... 1.41
1.15 Homogeneous Coordinates Representation ............. 1.42
1.16 Homogeneous Transformation Matrices .................. 1.45
1.16.1 Translation .................................................. 1.45
1.16.2 Scaling . ....................................................... 1.45
1.16.3 Rotation ....................................................... 1.45
1.16.4 Shear ........................................................... 1.46
1.16.5 Application of homogeneous coordinate
representation.. ....................................................... 1.46
1.17 Line Drawing.. ........................................................... 1.47
1.17.1 Digital differential analyzer algorithm ... 1.48
1.17.2 Bresenham’s line drawing algorithm ...... 1.56
1.17.3 Procedure for line generation when
slope m  1 .. ........................................................... 1.56
1.17.4 Procedure for generating the line when
slope m  1 .. ........................................................... 1.57
1.18 Clipping ..... ................................................................. 1.61
1.19 Viewing Transformation ............................................ 1.62
1.20 Possible Part : B Questions ..................................... 1.64
C.3 Computer Aided Design

2. GEOMETRIC MODELING

2.1 Introduction. ................................................................. 2.1


2.2 Representation Of Curves........................................... 2.1
2.2.1 Analytic curve ............................................... 2.2
2.2.2 Synthetic curves............................................ 2.2
2.3 Hermite Curve.. ........................................................... 2.3
2.3.1 Shape control of Hermite curve ................. 2.9
2.3.2 Limitations of Hermite curve ..................... 2.9
2.4 Bezier Curve ..... ........................................................... 2.11
2.4.1 Disadvantages of Bezier curves .................. 2.17
2.4.2 Difference Between the Bezier curve and
Hermite curve . ....................................................... 2.18
2.5 B - Spline Curves ....................................................... 2.19
2.5.1 Advantages of B - spline curve.................. 2.23
2.6 Rational Curves ........................................................... 2.24
2.7 Techniques Of Modelling ............................................ 2.25
2.8 Geometric Modelling .................................................... 2.25
2.9 Surface Modelling ....................................................... 2.28
2.9.1 Surface Patch................................................ 2.32
2.9.2 The Coons Patch .......................................... 2.32
2.9.3 The Bicubic Patch........................................ 2.33
2.9.4 Bezier surface................................................ 2.34
2.9.5 B-spline surface ............................................ 2.34
2.10 Solid Modelling........................................................... 2.36
2.10.1 Boundary representation method (b-rep). 2.37
2.10.2 The Advantage of B-rep ............................ 2.40
2.10.3 Disadvantages of B-rep ............................. 2.41
Contents C.4

2.10.4 Constructive Solid Geometry (CSG)......... 2.41


2.10.5 The Advantages of CSG or C-rep............ 2.43
2.10.6 Disadvantages of CSG............................... 2.43
2.11 The Salient Features of Solid Modelling
Package Includes..... ........................................................... 2.43
2.11.1 Feature based design ................................. 2.43
2.11.2 Sketched Feature Method.......................... 2.45
2.11.3 Pick-and place Feature.............................. 2.45
2.11.4 Modelling Tools ........................................ 2.49

3. VISUAL REALISM

3.1 Introduction. ................................................................. 3.1


3.2 Approaches or Techniques For Visual Realism....... 3.3
3.3 Object Space and Image Space Methods ................. 3.6
3.3.1 Difference between Object space method
and Image-space method....................................... 3.8
3.4 Visibility ...... ................................................................. 3.11
3.4.1 Visibility techniques for improving
efficiency of algorithms ......................................... 3.13
3.4.1.1 Bounding Box or Minimax Test ............ 3.14
3.4.1.2 Containment Test ..................................... 3.16
3.4.1.3 Backface Culling (or) Surface Test........ 3.18
3.4.1.4 Silhouette Detection ................................. 3.20
3.4.1.5 Edge Intersections .................................... 3.23
3.4.1.6 Segment (scanline) comparisons............. 3.24
3.4.1.7 Homogeneity Test ..................................... 3.27
3.4.2 Sorting ........................................................... 3.29
3.4.3 Coherence....................................................... 3.30
C.5 Computer Aided Design

3.5 Hidden Line Removal.................................................. 3.32


3.5.1 Priority Algorithm ........................................ 3.38
3.5.2 Area-oriented Algorithm .............................. 3.43
3.5.3 Hidden Line Removal for curved
surfaces .. ................................................................. 3.46
3.6 Hidden Surface Removal............................................. 3.47
3.6.1 Painter’s Algorithm ...................................... 3.48
3.6.2 Depth-Buffer (Z-buffer) algorithm .............. 3.52
3.6.3 Warnock’s Area Subdivision Algorithm..... 3.54
3.7 Hidden Solid Removal................................................. 3.59
3.7.1 Ray Tracing .................................................. 3.60
3.8 Shading........ ................................................................. 3.65
3.9 Shading Methods.. ....................................................... 3.72
3.9.1 Flat shading or constant intensity
shading .. ................................................................. 3.72
3.9.2 Smooth shading............................................ 3.72
3.9.2.1 Gourand shading ...................................... 3.73
3.9.2.2 Phong shading........................................... 3.76
3.9.3 Difference between Flat and Smooth
shading .. ................................................................. 3.77
3.9.4 Shading Enhancements ............................... 3.78
3.10 Colouring ... ................................................................. 3.79
3.10.1 Colour models ............................................. 3.83
3.10.1.1 RGB colour model .................................. 3.87
3.10.1.2 CMY (or) CMYK colour model............. 3.88
3.10.1.3 YIQ colour model.................................... 3.89
3.10.1.4 HSV colour model .................................. 3.90
3.10.1.5 HSL colour model................................... 3.91
3.11 User Interface For Shading And Colouring........... 3.93
Contents C.6

3.12 Computer Animation ................................................. 3.94


3.12.1 Types of Animation.................................... 3.97
3.12.1.1 Frame Buffer Animation ....................... 3.97
3.12.1.2 Real-Time Playback................................ 3.101
3.12.1.3 Real Time Animation............................. 3.101
3.12.2 Computer Animation Techniques ............. 3.102
3.12.2.1 Keyframing .............................................. 3.103
3.12.2.2 Procedural Animation ............................ 3.106
3.12.2.3 Motion capture ........................................ 3.107
3.12.3 Computer Animation hardware and
software . ................................................................. 3.107
3.12.4 Animation problems ................................... 3.108

4. ASSEMBLY OF PARTS

4.1 Introduction. ................................................................. 4.1


4.2 Assembly Modeling ...................................................... 4.1
4.3 Heat Application .. ....................................................... 4.2
4.3.1 Continuous welding...................................... 4.3
4.3.2 General design points of continuous
welding .. ................................................................. 4.4
4.3.3 Localised welding ......................................... 4.5
4.3.4 Brazing and soldering ................................. 4.6
4.4 Chemical Application Technique................................ 4.6
4.5 Mechanical Joints. ....................................................... 4.8
4.6 Automated Assembly ................................................... 4.9
4.7 Facilitating Assembly Processes ................................ 4.10
4.8 Interference of Position And Orientation ................. 4.11
4.9 Tolerance Analysis ....................................................... 4.14
C.7 Computer Aided Design

4.9.1 Definition and need for tolerances ............ 4.14


4.9.2 Tolerance Vs Cost ........................................ 4.15
4.9.3 Tolerance presentation ................................. 4.16
4.9.4 Tolerance allocation ..................................... 4.17
4.9.5 Tolerance grade ............................................ 4.19
4.9.6 Geometric tolerances .................................... 4.20
4.9.7 Geometric tolerancing examples ................. 4.21
4.9.8 When to use geometric tolerancing ............ 4.28
4.10 Mass Property Calculations...................................... 4.29
4.11 Mechanism Simulation ............................................ 4.40
4.12 Interference Checking................................................ 4.45

5. CAD STANDARDS

5.1 Introduction. ................................................................. 5.1


5.2 Standards For Computer Graphics ........................... 5.2
5.2.1 Special Interest Group on graphics
(Siggraph CORE) ................................................... 5.3
5.2.2 Other graphics standards ........................... 5.3
5.3 Graphics Kernel System (GKS) ................................. 5.4
5.4 Standards For Exchanging Images ........................... 5.7
5.4.1 Bitmaps.. ....................................................... 5.8
5.5 Open Graphics Library ............................................... 5.10
5.6 Data Exchange Standards .......................................... 5.11
5.7 Development of Data Exchange Format................... 5.12
5.8 IGES ............ ................................................................. 5.14
5.8.1 IGES File structure ..................................... 5.15
5.8.2 Error handling ............................................. 5.17
Contents C.8

5.9 STEP ............ ................................................................. 5.17


5.9.1 Difference between IGES and STEP ......... 5.20
5.10 CALS.......... ................................................................. 5.20
5.11 Communication Standards ........................................ 5.21
5.11.1 Local Area Networks ................................. 5.22
5.11.2 Wide Area Networks .................................. 5.23
5.11.3 Fiber optic links ......................................... 5.24
Chapter I

COMPUTER AIDED DESIGN (CAD)

Product cycle - Design process - Sequential and concurrent


engineering - Computer aided design - CAD system architecture -
Computer graphics - Coordinate systems - 2D and 3D
transformations - homogeneous coordinates - Line drawing -
Clipping - Viewing transformation.

1.1 INTRODUCTION
The present century is known for rapid development
in the fields of computer in both hardware and software.
It has become the most important tool in all technological
developments. The computers are becoming larger in
memory and faster in computation speed. With the
advancement of very large scale integration technology,
computer hardware is gradually getting cheaper and now
they are within the financial range of most of the
industries/organizations. The entry of computers in design
and manufacturing has led to the emergence of new areas
known as Computer Aided Design (CAD) and Computer
Aided Manufacturing (CAM). Traditionally design and
manufacturing are two distinct and separate activities.
However, the integration of CAD/CAM system is a boon for
the design and manufacturing of engineering products. The
term CIM (Computer Integrated Manufacturing) is
associated with the application of computers to the
manufacturing of products starting from the drawing office
to the machine tools on production floor, and assembly shop
to the quality control department, and stores department
for shipping, and finally to the dealers for marketing.
1.2 Computer Aided Design www.airwalkpublications.com

1.2 PRODUCT CYCLE

D e sign P ro cess

C u stom er D ra fting
Pro du ct
Feed B ack D e sign An d
C o ncept
D o cum enta tio n

M anufacturing Process
Pro cess
Planning
O rd er N ew
Eq uipm e nt
a nd Tooling

M arke tin g Q uality Pro du ctio n


Pa cking Pro du ctio n
C o ntrol Planning

Fig:1.1 Product Cycle fo r Desig n and M an ufacture

Manufacturing process
The process planning specifies the sequence of
production operations required to make the product. New
equipment and tools must sometimes be acquired to
produce the product.
The next stage is scheduling which provides a plan
that commits the company to the manufacture of certain
quantities of the product by certain dates.
Once all of these plans are formulated, the product
goes into production, followed by quality testing, and
delivery to the customer.
Computer Aided Design 1.3

1.2.1 Typical product cycle


The impact of CAD/CAM involves in all the different
activities of the product cycle, which is shown in Fig. 1.2.
Computer - aided design and automated drafting are
utilized in the conceptualization, design, and documentation
of the product. Computers are used in production to monitor
and control the manufacturing operation. In quality control,
computers are used to perform inspections and performance
tests on the product and its components.
Design process
Figure 1.1 shows the various steps involved in the
product cycle. The product cycle is driven by customers and
markets which demand the product. It is realistic to think
of these as a large collection of diverse industrial and
consumer markets rather than one monolithic market.
Depending on the particular customer group there will be
differences in the way the 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 the same firm. But somehow, the product
cycle begins with an idea of product or product concept.
This concept is generated, 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 how the
product is made and providing a set of specifications
indicating how the product should perform.
1.4 Computer Aided Design www.airwalkpublications.com

With the engineering changes (i.e) drafting which


typically follow the product throughout its life cycle this
completes the design activities.

Co mp uter C o mp uter Autom a ted


Aided D ra fting and
d esig n D o cu m enta tio n

Pro du ct D e sign
D ra fting
C o ntrol En gineering

Co mp uter
C u stom ers O rd er N ew
Pro cess Aided
a nd Eq uipm e nt
Planning Pro cess
M a rkets a nd Too ling
Planning

Q uality Sched uling


Pro du ction
C o ntrol

Co mp uter C o mp uterized S cheduling


C o mp uter Aid ed C o ntrolled M aterial R e qu ire men t
Q uality R o bo ts, Planning , Shop Floo r
C o ntrol M ach ines, E tc C o ntrol
Fig:1.2 Prod uct Cycle with CAD / CAM

In the design and production operations of modern


manufacturing techniques, the computer has become a
pervasive, useful and indispensable tool. It is strategically
important and competitively imperative that manufacturing
firms and the people who are employed by them understand
CAD/CAM.
Computer Aided Design 1.5

1.3 DESIGN PROCESS


Design process is an activity that facilitates the
realization of new products and processes through which
technology the human needs and aspirations are satisfied.

Design process cannot be summarized in a formula.


It can be the work of an individual or efforts of a group
of people. Design process is not straight forward but it is
an iterative process. It means that after processing every
step of design process one should go to the previous steps.

There are many ways of defining the steps in a


traditional design process. In 1975 Deutschman has
summarized the design process in the following nine steps.

(i) Recognition of need

(ii) Problem definition and specification

(iii) Feasibility study

(iv) Design synthesis

(v) Analysis and preliminary design

(vi) Detailed design

(vii) Prototype building and testing

(viii) Design for mass production

(ix) Product release

Later on, in 1983, Shirley has combined few of the


design steps and redefined the design process in six steps.

A typical block diagram for the classical or


conventional design approach is shown in Fig 1.3.
1.6 Computer Aided Design www.airwalkpublications.com

R e cognition of N eeds

Pro blem D efinition

M odification Synthe sis M odification

An alysis an d O ptimization

D e sign R eview

Pre sen tation

Fig: 1.3 Con ventional Design Pro cess

1. Recognition of need
The design process involves initially in identifying the
need. The product begins with a need based on market
survey and customer’s demand. The data is collected via
observation and/or a detailed survey. There may be:
 Adoption of existing design
 Modifications in the existing design
 Completely new design
Computer Aided Design 1.7

2. Problem definition
In the problem definition, the designer’s task is
defined and criterion for the performance of designed
product is specified. The designer collects different
information about the existing products of similar type,
about the market potential, about the manufacturing
constraints, about the legal requirements and standards
and so on. The specifications, constraints and design
criteria may be:

Specifications: Such as power required, life of product,


efficiency, reliability, cost, temperature range, etc.

Constraints: (i.e) Maximum and minimum values of the


specifications.

Criteria: Used to decide the goodness of the design


amongst the alternative design process, e.g, for shaft
design, the strength and stiffness criteria should be
specified, diameter of the shaft based on certain theory of
failure.

3. Synthesis
Synthesis is nothing but the conceptualization.
Synthesis forms a design solution to satisfy the need. The
end goal of synthesis is a conceptual design of the product.
In this phase, sketches of different components and
assembly are drawn. The feedback received from the
marketing professionals also help to build up a strong
concept of design. Synthesis requires a sound technical
background, creativity and experiences of the designer.

In synthesis, the design parameters are adjusted to


get a perfect fit; if fit does not occur, the designer can
1.8 Computer Aided Design www.airwalkpublications.com

change the specifications or sometimes even modify the


need specified in Recognition of need.

4. Analysis and optimization


Analysis must be followed for every synthesis.
Analysis is a highly iterative process and requires good
mathematical knowledge. Analysis means critically
examining an already existing or proposed design to judge
the suitability for the task that is to be performed by the
designer. Analysis determines whether the performance
complies with the requirements or not. The analysis
subprocess selects suitable material and its associative
mechanical properties. Calculations are performed to
determine the size or parameters using the physical laws
such as laws of momentum, motion, energy conservation,
etc. The different types of engineering analysis are
stress-strain analysis, kinematic analysis, dynamic analysis,
vibration analysis, thermal analysis, fluid-flow analysis, etc.

Optimization means the best possible solution for the


given objectives. All possible solutions are analyzed and
optimum is selected. After every phase of design process,
the designer may go to the previous steps and modify them.

5. Design review
Design review is nothing but evaluation. Evaluation
means measuring the design against the specifications set
in the problem definition. It usually involves prototype
building and testing of the product to ascertain operating
performance or factors such as reliability. The result of
evaluation phase may yield a satisfactory design or it may
lead to further modifications in the design parameters. The
changes into the prototype assembly are incorporated
Computer Aided Design 1.9

during continued testing of the product. This process is


repeated until satisfactory performance of the component
and assembly is achieved.

6. Presentation
Presentation means drafting. The final stage in design
process is the presentation and documentation of the design
on paper. This forms an interface between the design and
the manufacture.

Production drawing shows various design parameters,


machining parameters, tolerances etc. The design is
presented using the drawings, parts list, materials,
specifications, etc. The design is not complete if one cannot
sell it. Therefore a great deal of effort should be applied in
the presentation of the design.

1.4 SEQUENTIAL ENGINEERING

The conventional product cycle is sequential. It


contains quality control, product design, manufacturing
process with every activity is carried out in a sequential
manner.

D esign P lan ning M an ufactu ring Q ua lity M arketing

Fig:1.4 Sequential Engineering


1.10 Computer Aided Design www.airwalkpublications.com

In sequential engineering, each department is


insulated i.e. each department functions separately.
There is no interaction among the groups.
This is time consuming as for example, if any flaw is
encountered during the quality check stage, the product has
to go through the whole cycle from the start.

1.5 CONCURRENT ENGINEERING


Concurrent engineering is known as simultaneous
engineering. Here, while the product is designed, the
design and manufacturing processes are carried out
simultaneously. This technique facilitates the design
engineer to improve the efficiency of product design and
process. This is effective interaction of process planning and
product design. Concurrent engineering also influences the
cycle cost of product. Concurrent engineering also unites
people from different functional areas.
The block diagram of concurrent engineering is shown
in Fig.1.5.

In sp e ction

M an ufactu rin g M ark e tin g

S e rvic ib ility D e sign


S a le s
C o -ord in ator

A ssem bly P a ck a ging

Fu nc tion

Fig:1.5 Sim ultan eou s (or) C oncurrent Eng ineerin g


Computer Aided Design 1.11

In a traditional designing process, complete design


descriptions are produced in the form of engineering
drawings and diagrams and these are then issued by the
design department of a company for analytical evaluation,
and for the preparation of plans and instructions for
manufacture. Inevitably, the manufacturing specialists and
design analyst find aspects of the design that should be
improved, and so the design is returned to the design
department for modification and reissue of the drawings.

In some cases reissue may occur many times - one


large aerospace manufacturer is said to change each
drawing an average of 4.5 times before final release - and
thus the whole process is both time consuming and costly.

Furthermore because the considerations of manufacturing


and other specialists are taken into account after the design
drawings have been produced, the design department tends
to concentrate on functional aspects of the design at the
expense of ease of manufacture, maintainability and so on.

Concurrent engineering aims to overcome all of these


limitations, by bringing together a design team with the
appropriate combination of specialist expertise to consider
early in the design process, all elements of the product life
cycle from conception through manufacture and use in
service to maintenance and disposal.

1.5.1 Characteristics of concurrent engineering


 Constant and un-interrupted evaluation of design
process and development process.
 Fast and speedy information exchange achieved
through internet, LAN etc.
 Rapid prototyping.
1.12 Computer Aided Design www.airwalkpublications.com

 More attention and concern for satisfying customer


needs.
 Focus on new technologies.

1.5.2 Need for implementation of concurrent


engineering
 In order to effectively implement concurrent
engineering, suitable training programs need to be
organized.
 The power should be decentralized which allows
effective participation of workers from all levels to
work together and solve the problem.
 Concurrent engineering ensures that the problem
between design and manufacturing, design and
production, etc. are removed.
 In concurrent engineering there is simultaneous
interaction between the groups, moreover all the
procedures are split into simple tasks which are
easier to complete.

1.6 COMPARISON OF SEQUENTIAL AND


CONCURRENT ENGINEERING
Sequential engineering is followed in conventional
manufacturing. As mentioned earlier, this process flows in
one direction and back-tracking at any stage is time
consuming and has to be started from first step. Moreover,
the activities of each department is localised and isolated.
Thus interaction among the group is lacking.

On the other hand, concurrent engineering facilitates


an effective interaction between various departments, such
as production planning, production development and
Computer Aided Design 1.13

manufacturing. Thus the spirit of team work is developed.


Moreover specialists from different departments interact
with each other and improve the efficiency of the production
design. Concurrent engineering includes special methods
such as DFMA (Design for manufacturing and assembly)
and FMEA (Failure mode and effect analysis) for flaw
finding and design optimizing.
Another difference is, in the infant stages numerous
changes will be encountered in the product cycle and these
changes progressively come down for the rest (i.e.)
remaining period for concurrent engineering.
In case of sequential engineering changes may not be
constant and predicted, but the magnitude of change differ
at every stage.
This comparison is depicted in the Fig. 1.6.

C oncurren t En gin ee ring


Nu m be r of C h an ge

S equen tial En gine ering

P ro duct De velop m ent C ycle


Fig:1.6 Com parison Graph

Detailed comparison is shown in Fig. 1.7.


1.14

R equire me nts Product P rocess P roduction


Se quential P rodu ct S tart F inish
D efinitio n D efinitio n D efinitio n and
D evelopm en t
D istribu tion
Ind ividu als
S lo w C han ge s
Long L ead Tim e C oncep t D etail
Low er Q ua lity E m bodime nt

E rrors, C ha nge s and C orrectio ns


S tart
Computer Aided Design

R eq uirem e nts
D efin ition

P rod uct
D e finition
C o ncu rren t P rod uct
D evelopm en t C o nce pt
E rrors, C ha ng es
Em bod im ent A nd
Tea ms
Fast C h an ges C o rre ctio ns
D e ta il
S hort Le ad Tim e
H ig her Q u ality P roce ss
D e finitio n
Finish
P rod uction a nd
D istrib ution
C E L ife C ycle Tim e
Tim e S aved
Fig:1.7 Sequential Versu s C oncurrent P roduct develop ment from Start to Finish
www.airwalkpublications.com
Computer Aided Design 1.15

1.7 COMPUTER AIDED DESIGN


In the field of computer science and technology the
advancements have resulted in the emergence of very
powerful hardware and software tools that offer scope in
the conventional design process, which results in the
improvement of quality of the product.

Thus, Computer aided design is the automation of


design process.

CAD is the use of computer to aid in the design


process of an individual part, a subsystem or total system.

CAD is the process of creation and development of a


prototype on a computer to assist the engineer in the design
process.

CAD creates a three dimensional geometric model on


the computer to examine the geometric and manufacturing
requirements of an object.

1.7.1 Why should we go for CAD?


There are four fundamental reasons for implementing
the CAD system, which are as follows.

(i) To increase the productivity of the designer.

(ii) To improve the quality of the design.

(iii) To improve communications.

(iv) To create a database for engineering.

1. To increase the productivity of the designer


The product and its components, subassemblies and
parts can be visualised quickly by the designer using CAD.
Time for synthesis, analysis and documentation of the
1.16 Computer Aided Design www.airwalkpublications.com

design will be reduced. Even it reduces design time and


cost.

2. To improve the quality of design


Without any error, quick alterations can be made in
the design with the help of CAD.

3. To improve communications
Better documentation of the design, fewer drawing
errors with greater legibility will be provided by CAD.

4. To create database for engineering


The product geometries and dimensions, bill of
materials, etc., will make a design database, which are
essential input for manufacturing of the product.

1.7.2 Factors considered for selecting CAD system


(a) Reliability

(b) Compatibility with other systems

(c) Cost factors

(d) Memory size and storage requirement.

(e) Type of peripherals required.

1.7.3 Role of computer in CAD


(i) Computer improves accuracy of design.
(ii) Various dimensions, and other design attributes can
be conveniently manipulated by computers.
(iii) Another role played by computers is creation of part
libraries for standard components. Similarly
multiple components can be included in these part
libraries.
Computer Aided Design 1.17

(iv) Moreover the modification of the model is very


simple which helps the designer to look in for
further improvement.
(v) Calculation of various geometric properties such as
area, volume, and dimenioning can be accurately
done.
The application of computers to the designing process
is shown in Fig. 1.8.

Tra ditio nal C om pu ter


D esign Pro cess A ide d D esign
R ecogn itio n O f
N eed

P ro blem
D efinition

G eo m etric
S ynthe sis
M od elin g

A nalysis A nd E ngine ering


O ptim izatio n A nalysis

D esign R e view
E valua tion
A nd Evalu a tio n

A uto ma ted
P re sen tatio n D ra fting

Fig:1.8 Application of Computer to the Design Process


1.18 Computer Aided Design www.airwalkpublications.com

1.8 BENEFITS OF CAD


Some important benefits of CAD are:

 CAD is faster, consistent and more accurate than


the classical design process.
 The manipulation of various dimensions,
attributes is easily possible under the CAD
environment. Some CAD software is parametric
and possesses parent-child relationship between
the component and assembly.
 The efficiency, effectiveness and creativity of the
designer improve drastically, leading to high
quality engineering designs. The added advantage
of CAD is excellent graphical representation and
production drawing of product with exchange
facility between different phases through
e-drawing.
 Easy modification and improvement of product is
possible in CAD environment taking care of
further needs.
 In CAD, it is not required to repeat the design or
drawing of any component with modified
dimensions. It is possible to copy and modify the
designs as per the new dimension within seconds,
including geometric transformations, material
replacements, if needed.
 Graphics simulation and animation makes it
possible to study the real-time behaviour of CAD
assembly. This is useful for inspecting tolerance
and interface between the matching components of
the model.
Computer Aided Design 1.19

 Use of standard components in part libraries


makes very fast CAD modeling. For a specific
task, various components, subassembly may be
stored in part libraries for future use.
 3D visualization of model from several
orientations eliminates the need of making a
prototype.
 The documentation at various design phases is
efficient, easier, flexible and economical. The
coordination among the groups and sharing of
design data and results is possible in CAD
environment.
 Most CAD software can link the geometric model
directly to its manufacturing counterpart, i.e, CAM
to carry out production.

1.9 ENGINEERING APPLICATIONS OF CAD


The CAD system is extensively used in mechanical
engineering and manufacturing industries. CAD increases
productivity of designer through the visualization of
components/assemblies. The engineering applications of
computer aided design (CAD) are shown in Table 1.1.

Applications Detail
1. Structural CAD analyzes the turbulent flow
design of Aircraft pattern in aerospace structures
1.20 Computer Aided Design www.airwalkpublications.com

Applications Detail
2. Aircraft The complex situation during the
simulation flight can be simulated in flight
simulator using the CAD software,
which avoids lengthy delay, saves
fuel cost and provides better than
pilots.
3. Real time It is possible to study the real-time
simulation behaviour and inspection of critical
parts subjected to repeated stresses
due to mechanical loading.
4. Automobile CAD provides various types of space
industries curves for the aerodynamic design of
automobile surfaces.
5. Architectural CAD has tremendous scope in
design architectural design of bridges,
buildings, structures, etc. It is
possible to estimate the building
materials requirements for a similar
design with different design
parameters.
6. Pipe routing CAD Design optimizes the pipe
and plan layout layout and plant layout in chemical
design plants.
7. Electronic CAD is applicable in the design of
industries Integrated circuits and printed circuit
board design used in electronic
equipment/machines.
Computer Aided Design 1.21

Applications Detail
8. Dynamic CAD design is useful for estimating
analysis of the dynamic forces, reactive forces of
mechanical systems mechanical systems at various time
intervals.
9. Kinematic Similar to dynamic force analysis,
analysis CAD estimates the kinematic
quantities such as displacement,
velocity and acceleration of various
links for different configurations of
the mechanism.
10. Mesh data The input data for FEA of a structure
preparation for consists of geometrical and
finite element mechanical properties, loading and
analysis boundary conditions, CAD system
generates the best mesh data
suitable to a particular problem. It is
possible to represent data graphically
to quickly guess the results.

Table: 1.1 - Applications of CAD

So far, CAD systems have been described in very


general terms. More specifically, they can be thought of as
comprising:

 Hardware:
The computer and associated peripheral equipment.

 Software:
The computer program(s) running on the hardware.
1.22 Computer Aided Design www.airwalkpublications.com

 Data:
The data structure created and manipulated by the
software.
CAD systems are no more than computer programs
perhaps using specialized computing hardware. The
software normally comprises a number of different elements
or functions that process the data stored in the database
in different ways. These are represented diagrammatically
in Fig. 1.9 and include elements for:

D a ta Function s

M odel
D a tab ase W orking D a ta D e finition

Co mp one nt G eom etry


M odels M anip ulatio n
Input
D ra w in gs Associate d D a ta U ser
Picture
G ene ration O utpu t
Standards M anufacturing

L ib rary U tilitie s
D a ta

D a ta B ase
M anag eme nt

Ap plicatio ns

Fig:1.9 The Architecture of Com pu ter Aided D esign System

 Model definition:
For example, to add geometric elements to a model
of the form of a component.
 Model manipulation:
To move, copy, delete, edit or otherwise modify
elements in the design model.
Computer Aided Design 1.23

 Picture generation:
The generate images of the design model on a
computer screen or on some hard-copy device.

 User interaction:
To handle commands input by the user and to present
output to the user about the operation of the system.

 Database management:
For the management of files that makeup the
database.

 Applications:
These elements of the software don’t modify the
design model, but use it to generate information for
valuation, analysis or manufacture.

 Utilities:
Parts of the software that do not directly affect the
design model, but modify the operation of the system in
some way.

For example, To select the colour to be used for


display, or the units to be used for construction of a part
model.

These features may be provided by multiple programs


operating on a common database or by a single program
encompassing all of the elements.

1.11 COMPUTER GRAPHICS


 Computer graphics is the language of engineers,
which provides a powerful tool for communication
1.24 Computer Aided Design www.airwalkpublications.com

among the team members associated with design,


manufacturing and sales of a product.
 Computer graphics involves the creation, storage,
manipulation and integration of models and
images of the object by means of a digital
computer.
The shaded and coloured two-dimensional,
three-dimensional and higher-dimensional models are
generated to bring the realism in different objects such as
natural scene, animation, flight simulation, navigation,
commerce, advertising, etc.

In recent years, computer graphics become a very


powerful tool for the development of high quality pictures
rapidly, consistently and economically.

Computer graphics is an important tool in computer


aided manufacturing (CAM) where the graphical data of the
object, converted into machine data, operates CNC
machines for production.

The synthesis of real or imaginary objects from their


computer model is concerned by computer graphics.

The image processing is the reverse of computer


graphics, which performs the analysis of pictures.

The computer graphics and image processing


techniques together deal with the computer processing of
pictures. Both use raster displays, combined in interactive
image processing.

Computer graphics is very popular in industries,


business, education, medicine, fashion, entertainment, etc.

It has made things easier to visualize.


Computer Aided Design 1.25

1.12 COORDINATE REPRESENTATION SYSTEM


Every CAD/CAM system follows certain type of
coordinate representation system. While displaying an
image, the mapping of coordinates of the object consisting
of 2D and 3D primitives occurs onto the display device or
workstation. This is obtained through the coordinates
transformations, also referred to as viewing
transformations.
1.12.1 Cartesian coordinate system
Cartesian coordinate system is mostly followed by the
graphics software design. If coordinates of an image is
defined in other coordinate system (eg., cylindrical or
spherical coordinate system), they must be converted into
the cartesian coordinates before using in the graphics
software.

L ocal W orld
N o rm aliz ed D e vice
C o -ord in ate C o -ord in ate
C o -o rdina te C o -o rdina te
S ystem S ystem
S ystem S ystem
( C a rte sia n, ( C a rte sia n )
( x n , yn) ( x d , yd)
P o la r,S ph erica l) ( xw , yw )

1
1
P o la r C o -ordin a te
1

D isp la y
C a rte sian C o -ord in ate Floating Po int N orm alised In teg er
Floating Po int N um bers Nu m b ers Nu m b ers Nu m b ers

   xw    0  xn  1 0  xd  xmaxüBçJ0%

Fig:1.10 View in g Transform ation Seq uence fro m Lo cal


C o-ordinates to D evice C o-Ordinates.
1.26 Computer Aided Design www.airwalkpublications.com

Fig. 1.10 shows the viewing transformation sequence


from local coordinates to the device coordinates. Broadly,
three types of coordinate system are required to input
display and store the geometry of graphics model during
the modeling process.

1.12.2 World coordinate system


World coordinate system (WCS) is the working or user
coordinate system, which describes the image in cartesian
coordinates. Firstly the shape of objects is created in the
form of graphics of image, using separate coordinate
reference frames, known as local coordinate system. The
units are the user units, which can be anything like mm,
m, km, foot, etc.,

Once all the objects in graphics images are described


by their individual local coordinate systems, they can be
placed in the graphics images with reference to one single
reference frame, i.e, cartesian coordinates. The WCS may

(i) have numerical values that depend on the type of


problem.
(ii) have positive values or negative values.
(iii) have range from   to   in both x and y
directions.
(iv) be represented by floating point numbers.
(e.g. 0.125  10 3; mantissa = 0.125 and exponent = 3)

1.12.3 Normalised coordinate system


For modeling, each graphics output device may follow
different coordinates. In some images, we might want to
specify objects dimensions in fraction of a foot, while for
some other applications it may be ‘mm’ (or) ‘km’.
Computer Aided Design 1.27

It is, therefore, desirable to convert the world


coordinates into the normalized coordinates. i.e, Normalized
coordinate system (NCS), to make the coordinate system
independent of several graphics output devices.

Normalization may be done from (0,0) to (1,1) with


origin at (0,0) in the lower left corner and co-ordinate (1,1)
on the right top corner of the display devices.

To accommodate the differences in scales and aspect


ratios, the mapping of normalized coordinates into square
area of the displays is required to maintain the proper
proportions of various images.

1.12.4 Device coordinate system


The device coordinate system is one in which the
image of normalized coordinate system will be displaced in
the output device like monitor (soft device), printer/plotter
(hard device).

A graphics device understands the device coordinate


system in terms of pixels, cm, inch, etc.

Depending upon the pixel density, the DCS would


vary from one system to another.

The features of device control system are follows:

(i) The pixel density (eg: 1024  1024 ) of the display


device depends on the maximum size.
(ii) Positive values have to be considered.
(iii) Always fixed in size (i.e. size of display surface)
irrespective of the problem.
(iv) It should be always represented by an integer
number.
1.28 Computer Aided Design www.airwalkpublications.com

1.13 TWO DIMENSIONAL TRANSFORMATION


Basic transformation
The transformations are used to reposition and resize
two-dimensional objects on the displays (alternatively, in
the database).
The three basic transformations are as follows:
(i) Translation
(ii) Scaling
(iii) Rotation
Any point is represented by its coordinates x, y, z
from the reference datum in the three dimensional system.
For simplicity and to make it easy to understand, we can
analyse the two dimensional system. Then we can discuss
the 3D system.
1.13.1 Translation
Translation is one of the important types of
transformation. This is used to move the entity. After
moving, all points of new entity are parallel to all points
of the old entity.
Moving the drawing or model across the screen is
called translation. This is accomplished by adding to the
coordinate of each corner point ‘the distance’ through which
the drawing is to be moved
x  x  m

y  y  n ...(1.1)
where, x, y  coordinates of the translated point

x, y  coordinates of the original point


m, n  movements in the x and y direction
Computer Aided Design 1.29

In matrix notation this can be represented as


x, y  x, y  T ...(1.2)
where,
T  m, n, the translation matrix
Problem 1.1: Translate a two dimensional rectangle as shown
in figure, by adding 4 units in x - coordinate and 3 units in
y - coordinate.

Given data ( 1 ,5 ) ( 4 ,5 )
T  4, 3

x 1  1; y 1  1

x 2  4; y 2  1

x 3  4; y 3  5 ( 1 ,1 ) ( 4 ,1 )

x 4  1; y 4  5 Fig.

To find
New translated rectangle
Solution
From equation (1.2)
We know that
x, y   x , y  T ...(1)
Expanding the equation (1) for 4 coordinate rectangle
 x 1 y 1   x1 y1 
   
 x2  y 2   x2 y2 
   [T]
 x 3 y 3   x3 y 3 
 x r y 4   x4 y4 
   
1.30 Computer Aided Design www.airwalkpublications.com

Substitute the given data values in equation (2), then


we have ...(2)
 x 1 y 1 
   1 1
 x2  y 2   4 1
  [4 3]
5

 x 3 y 3   4

 x 4 y 4   1 5
 

 x 1 y 1 
   5 4 
 x2  y 2   8 4 
  
 x 3 y 3   8 8

 x 4 y 4   5 8 
  ...(3)
Equation (3) is the New translated rectangle

Result

9 ( 5 ,8) ( 8 ,8)
8

7
N ew Transla te d
6 R ectan gle
( 1 ,5 ) ( 4 ,5 )
5

4
( 5 ,4 ( 8 ,4 )
3
2 O rig in al
R ectan gle
1
( 1 ,1 ) ( 4 ,1 )
x
1 2 3 4 5 6 7 8 9
Fig: O rigin al an d N e w Trans la ted R ectang le.
Computer Aided Design 1.31

Problem 1.2: Translate a triangle ABC with coordinates A


(1,1) B (3,5), C (1,3) about the origin by 3 units in x - direction
and 3 units in y direction.

Given data
T  3, 3
x1  1; y1  1

x2  3; y2  5

x3  1; y3  3

To find
Translate the triangle
Solution
From equation (1.2), we know that,
x, y  x, y  T ...(1)
Expanding the equation (1) for the triangle
 x 1 y 1   x1 y1 
   
 x2  y 2    x2 y 2   [T]
x  y 3   x3 y3 
 3    ...(2)
Substitute the given data in equation (2) so, equation
(2) becomes,
 x 1 y 1   1 1 
 
 x2  y 2    3 5   [3 3]

x  y 3   1 3 

 3 

 x 1 y 1   4 4 
 
 x2  y 2    6 8 

x  y 3   4 6 

 3  ...(3)
1.32 Computer Aided Design www.airwalkpublications.com

Equation (3) is the new translated triangles


coordinates.
Result

y
( 6 ,8 )
8
7
( 4 ,6 )
6 Tra ns la ted
( 3 ,5 ) Tria ng le
5

4
( 1 ,3 ) ( 4 ,4 )
3
2 O rigin al
Tria ng le
1
( 1 ,1 )
x
1 2 3 4 5 6 7 8
Fig: O riginal and New Translated Triangle

1 2
Problem 1.3: Consider the line defined by, L   .
3 4
Translate the line 3 units in x - direction and 4 units in y
direction.

Given data
T  3, 4
Computer Aided Design 1.33

x1  1; y1  2

x2  3; y2  4

To find
Translate the line

Solution

From equation 1.2 we get,

x, y  x, y  T


...(1)
Expand the equation (1) for 2 points. So equation (1)
becomes,

 x1 y1   x1 y1 
  x2 y2 
 [T]
 x2
y2
   ...(2)
Substitute the given data in equation (2)

 x1 y1   1 2
 3  [3 4]
4 
 x2
y2
 

x  y1   4 6
1
 
y 21   6 8 
 x2 ...(3)
Equation (3) is the new translated line coordinates.
1.34 Computer Aided Design www.airwalkpublications.com

Result

y
8 ( 6,8 )

7 Tra nslate d
L in e
6
( 4,6 )
5

4 ( 3,4 )

3 O rigin al
L in e
2
( 1,2 )
1

x
1 2 3 4 5 6 7 8
Fig: O riginal and New Translated Line

1.13.2 Scaling
Scaling of an element is used to enlarge it or reduce
its size.
A drawing can be made bigger by increasing the
distance between the points of the drawing. In general, this
can be done by multiplying the coordinates of the drawing
by an enlargement or reduction factor called scaling factor,
and this operation is called scaling.
The coordinates of an object is multiplied uniformly
by the scaling factor.
Computer Aided Design 1.35

p’

Sy x y
p
y

x
sx
Fig: 1.11. S ca lin g o f a R ectangle

From Fig. 1.11 it is shown that a rectangle is


enlarged using scaling.

The scaling matrix is given as follows:

 Sx 0
S
0 Sy 
  ...(1.3)
where,

S  Scaling matrix

Sx  Scaling in x direction

Sy  Scaling in y direction

Sx and Sy need not be equal. A circle can be


transformed into an ellipse by unequal scaling factors Sx
and Sy. If the scaling factors are less than 1, it will reduce
1.36 Computer Aided Design www.airwalkpublications.com

the size of the object and the object is moved towards the
origin.
If it is greater than 1, then it will enlarge the size
of the object and object is moved away from the origin.

P  [x, y]  [S x  x, S y  y]

The above equation can be represented in a matrix


form as follows:

 Sx 0x
P  
0 S y   y  ...(1.4)
 
(i.e)

P  [S]  [P]

 While zooming or magnifying the object, uniform


scaling ((i.e) Sx  S y) is applied.

 Zooming or magnifying is only a display attribute


and is used only to the display and not stored in
actual geometric database.
1 2
Problem 1.4: A line AB   is enlarged by a scaling
3 4
factor of 2. Show the transformation.

Given data
Sx  S y  2

x1  1 ; y1  2

x2  3 ; y2  4

To find
To obtain the transformation using scaling.
Computer Aided Design 1.37

Solution
 Sx 0
The scaling matrix , S  
0 Sy 
 

1 2
Original line matrix  AB  
3 4 

Scaled line matrix is determined as follows.

[S]  [AB]  [A B ]

2 01 2
0  [A B]
 2   3 4 

2 4
A  B    are new scaled line coordinates
6 8 

Results
y

9
(6,8)
8

6 N ew scaled
Line
5
(3,4)
4
(2,4)

3 O riginal
Line
2
(1,2)

x
1 2 3 4 5 6 7 8 9
1.38 Computer Aided Design www.airwalkpublications.com

1.13.3 Rotation
Rotation is also an another important transformation.
In this transformation, all the points of an object are
rotated about the origin (or) about any base point by an
angle .
For a positive angle, the object is rotated in
anticlockwise direction and viceversa.
Consider a point P in xy plane. P is rotated in the
anticlockwise direction to get new position P through an
angle of  as shown in Fig. 1.12.

1
P 1 1
( x ,y )
1
x
( x, y )
P

y
1 r
r y


x
O
x
Fig:1.12 Rotation of a S quare

The new position,

[x, y]

The original position is,


Computer Aided Design 1.39

x, y

The rotation of the object by some angle will also


move the object.

In matrix notation, the procedure would be as follows:

x, y  x, y R ...(1.5)


where,

 cos  sin  
R  Rotation matrix
  sin  cos   ...(1.6)

Problem 1.5: Consider the line of coordinates (1,1) and (2,4)


Rotate the line about the origin by 30. Determine the
transformation of the line.

Given data
  30

x 1  1; y 1  1

x 2  2; y 2  4

To find
Transformation of the line

Solution
We know that from equation (1.5)

x y  x, y R ...(1)
where,

 cos  sin  
R
  sin  cos   ...(2)
Apply  as 30 in equation (2)
1.40 Computer Aided Design www.airwalkpublications.com

 cos 30 sin 30 


R
  sin 30 c o s 30 

 0.866 0.500 
R
  0.500 0.866  ...(3)
Apply equation (3) in (1)

1 1   0.866 0.500 
x y  
2 4    0.500 0.866 

 0.366 1.366 
x y  
  0.268 4.464 

The effect of applying the rotation matrix to the line


is shown in result.

Result

(-0.2 68 ,4.464) 5
( 2,4 )
4

R otated 3
L in e O rig ina l
L in e
2

1
(0.366 ,1.36 6) ( 1,1 )

-x x
-3 -2 -1 0 1 2 3 4 5 6
Computer Aided Design 1.41

1.14 THREE DIMENSIONAL TRANSFORMATIONS


Transformations by matrix methods can be extended
to three-dimensional space.

The procedure used for two dimensional


transformations can be extended to three dimensional by
adding z axis. The transformation matrix will then be
3  3.

1.14.1 Translation
For a three dimensional element, the translation point
will be given as,

T  m, n, p ...(1.7)
where, m, n, p are the coordinates of translation point
or increment.

In matrix notation, it is given as,

x, y, z  x, y, z  T ...(1.8)

1.14.2 Scaling
The scaling transformation is given by,

m 0 0 
S   0 n 0 

 0 0 p  ...(1.9)
 
where,

m, n and p are the units needed, to be scaled. For


equal values of m, n and p, the scaling is linear.

1.14.3 Rotation
For each axis, the rotation in three dimensions varies.
1.42 Computer Aided Design www.airwalkpublications.com

For Z axis
Rotation about the Z axis by angle  is given by the
matrix,
 cos   sin  0 
 
R z   sin  cos  0 
 0 0 1  ...(1.10)
 

For Y axis
Rotation about y - axis by angle  is given by matrix.
 cos  0 sin  
 
Ry   0 1 0 
  sin  0 cos   ...(1.11)
 

For x axis
Rotation about x - axis by angle  is given by matrix,
1 0 0
 
Rx   0 cos   sin  
0 sin  cos   ...(1.12)
 

1.15 HOMOGENEOUS COORDINATES


REPRESENTATION
The difficulty in image manipulation, incorporating all
the five types of geometric transformations, can be removed
if represented by a single matrix equation. This will be
possible only if points are represented in homogeneous
coordinates.
The homogeneous coordinates are obtained by adding
the third coordinate to a point.
This facilitates the image manipulation with a single
transformation matrix for all types of geometric
transformations.
Computer Aided Design 1.43

In homogeneous coordinate system, mapping between


the n-dimensional spaces with n  1 dimensional spaces
occur, it points in n-dimensional coordinates are
represented by the corresponding n  1-dimensional
coordinates.
This is obtained by introducing a scale factor along
the cartesian coordinates.
For 2D coordinates, instead of being represented by a
pair x, y, each point is represented by triple coordinates
x, y, h where h  0 , is the scalar factor.
The relationship between the cartesian coordinates
and homogeneous coordinates of a point is given by,
x y
x ;y
h h

(i.e)

x  xh; y  yh ...(1.13)
Generally, h  1 represents a homogeneous coordinate
x, y, 1 for a point x, y in computer graphics.

Two sets of homogeneous coordinates x, y, h and


x, y, h represent the same point if and only if one is a
multiple of the other.

Different homogeneous coordinates can represent each


point. For example: homogeneous coordinates of a point
(3,2) may be expressed by the coordinate triple as (3,2,1)
or (6,4,2) or (9,6,3). If we take all triples representing the
same point, we get a line in 3D space.

Each homogeneous point represents a line in 3D


space. If these points are homogenized points from the
1.44 Computer Aided Design www.airwalkpublications.com

plane, defined by equation h  1, in x, y, h space is shown


in Fig. 1.13. Graphically, the scale factor h may be
interpreted as the cartesian image on a plane parallel to
the xy plane and at unit distance away from the origin
along z - direction.
The points with h  0 are called points at infinity (not
represented on the planes), and will not appear very often
in the discussion.

y
y

Th ird P rin cipa l A xis


P erp en dicu la r to xy P lan e
x

h =1

x
Fig:1.13 .T he (x ,y,h) H om og en eo us C oo rdin ate Sp ace
W ith h =1 Plane

This type of visualization is not possible in 3D


geometric transformations.
In computer graphics, we shift the coordinates of the
object model from x, y coordinate space to x, y, 1
coordinate space, keeping h  1. Thus ‘1’ should be added
while defining any coordinate in 2D.

For example, a point in 3D  3, 4, 2 should be


represented as (3, 4, 2, 1).
Computer Aided Design 1.45

1.16 HOMOGENEOUS TRANSFORMATION MATRICES


In generalized form, the matrix equation incorporating
all five types of geometric transformations may be
expressed as

 xT  A B 0   x  x
       
 yT C D 0   y   [T]  y 
1   0 0 1  
1  
1
     ...(1.14)
where,

[T]  Transformation matrix in homogeneous


coordinates.

1.6.1 Translation
The translation of homogeneous matrix is given as,

1 0 tx 
 
[T t ]   0 1 ty 
0 0 1
  ...(1.15)

1.16.2 Scaling
The scaling of homogeneous matrix is given by

 Sx 0 0
 
[S ]   0 Sy 0
 0 0 1 ...(1.16)
 

1.16.3 Rotation
For homogeneous transformation, counter clockwise
rotation (CW) in the xy plane is given by,

 cos   sin  0 
 
[Tr]   sin  cos  0 
 0 0 1  ...(1.17)
 
1.46 Computer Aided Design www.airwalkpublications.com

For homogeneous transformation, clockwise rotation


(CW) in xy plane is given by,

 cos   sin  0 
 
[T r]    sin  cos  0 
 0 0 1 
  ...(1.18)

1.16.4 Shear
For homogeneous transformation, the shear along x -
axis is given by

1 Sh x 0
 
[Sh x]   0 1 0
0 0 1
  ...(1.19)
For homogeneous transformation shear along y
direction is given by,

 1 0 0
 
[Sh y]   Sh y 1 0
 0 0 1
  ...(1.20)
For homogeneous transformation shear along x and
y axis is given by,

 1 Sh x 0
 
[Sh]   Sh y 1 0
 0 0 1
  ...(1.21)

1.16.5 Application of homogeneous coordinate


representation
(i) It helps to achieve advanced type of transformation
such as projection.
Computer Aided Design 1.47

(ii) It removes many anomalies encountered in cartesian


geometry such as representing the points at infinity
and non-intersection of parallel lines.
(iii) It is possible to calculate overall transformation
matrix through the matrix multiplications
corresponding to each geometric transformations.

1.17 LINE DRAWING


Line can be created by calculating the intermediate
position along the line path between two end points.

In a vector display, a line can be drawn smoothly


from one end point to the other. Depending on the changes
in x and y directions, different lines can be drawn.

A line drawing algorithm must satisfy the following


features:

 On the display device, line should appear straight.


 Line should terminate accurately at the end.
 Constant density of the line should be maintained
through out the length.
 Line should be drawn accurately.
By joining up the two end points by discrete points
a line can be drawn. The coordinate positions of the discrete
points along the line path are calculated from the equation
of the line.

Two important methods of generating a line segment


are given below:

1. Digital Differential Analyser - (DDA) Algorithm

2. Bresenham’s line Algorithm


1.48 Computer Aided Design www.airwalkpublications.com

1.17.1 Digital differential analyzer algorithm


Digital differential analyzer is a scan conversion
line-generating algorithm, based on the calculation of either
 y or  x differences along the line path.

A line can be generated by increasing unit interval


in one coordinate and determining the corresponding
integer values of interval in other coordinate nearest to the
line path.

The equation of straight line is given as,

y  mx  b ...(1.22)
where,

m  slope

y2  y 1
m
x2  x 1
...(1.23)
y

x

For any value of  x, we can compute the


corresponding  y by the equation.

ymx ...(1.24)

Similarly for any value of  y, we can compute the


corresponding  x by the equation.

y
x
m ...(1.25)
There are two possibilities of slope, either m  1 or
m  1.
Computer Aided Design 1.49

Slope Le ss T han 1 (i.e ) m <1 Slope Mo re Th an 1 (i.e) m> 1


Fig:1.14 Lines in Raster Device with Positive Slop e.

Fig. 1.14 shows the two lines with positive slope on


the raster scan displays.

Case (i)

If slope is less than 1 (i.e) m  1 is positive


Consider the increment in x coordinate as unity, and
the line starts from left and extends (i.e)  x  1.

If xk, yk is any current point on the line path, then


next point will be xk  1  xk  1 and yk  1  yk  m because
for  x  1,  y  m  x  m.1  m.

Similarly if line starts from right, the procedure


remains same except that the new coordinate will be
xk  1  xk  1 and y k  1  y k  m .
1.50 Computer Aided Design www.airwalkpublications.com

Case (ii)

If slope is greater than 1 (i.e) m  1 and it is positive


Let the line starts from left and extends to the right
with unit increment in y coordinate, i.e.,  y  1.

If xk, yk is any current point on the line path, then


1
the next point will be yk  1  yk  1 and xk  1  xk  ,
m
y 1
because for  y  1,  x   .
m m

Similarly if line starts from right, the procedure


remains same except that the new coordinate will be
1
yk  1  yk  1 and x k  1  x k 
m

Case (iii)

If m  1 and slope is negative


Consider the line starts from right, the procedure
given for m  1. (case i), follows with modification that as
one coordinate x decreases, other coordinate y increases
 New coordinate will be,

x k  1  x k  1 and yk  1  yk  m

Case (iv)

If m  1 and slope is negative


Consider the line starts from right to left, the
procedure given for m  1 (case (ii)) follows with the
modification that as one coordinate y decreases, other
coordinate x increases.
Computer Aided Design 1.51

 New coordinate will be

1
y k  1  y k  1 and xk  1  xk 
m

Digital differential analyzer algorithm generates a


straight line at a fast speed.

Problem 1.6: Draw a straight line connecting two end points


(2,7) and (15,10).

Given data
x 1  2; x 2  15

y 1  7; y 2  10

To find
Draw a straight line from given points.
Solution
x 2  x1  15  2

 13
y 2  y1  10  7

3
y2  y 1
m  slope 
x2  x 1

3

13

 0.23076

Since slope m  1 and positive. This comes under case


(i) therefore, new coordinates will be

xk  1  xk  1
1.52 Computer Aided Design www.airwalkpublications.com

yk  1  yk  m

The intermediate pixels from point A to B are


calculated. The table shows the intermediate pixel positions
and line is shown Fig.

(Round of)
Integer values Real values
K Integer values
xk  1  xk  1 yk  1  yk  m
yk  1  yk  m

0 2 – 7

1 3 7.230 7

2 4 7.46 7

3 5 7.69 8

4 6 7.92 8

5 7 8.15 8

6 8 8.38 8

7 9 8.61 9

8 10 8.84 9

9 11 9.07 9

10 12 9.3 9

11 13 9.53 10

12 14 9.76 10

13 15 9.99 10 (accurate)
11

(1 5,10)
10

8
Actual Lin e
( 2,7)
7

1
Computer Aided Design

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Fig : Po tted L ine
1.53
1.54 Computer Aided Design www.airwalkpublications.com

Problem 1.7: Digitize the line with end points A (20,10) and
B (10,18) using DDA algorithm.

Given data
x 1  20; x2  10

y 1  10; y2  18

To find:
Obtaining the line with DDA algorithm

Solution
x 2  x1  10  20   10

y 2  y1  18  10  8

 y y2  y 1
slope, m  
 x x2  x1

8
   0.80
 10

since slope m  1 and negative

It is case (iii)

Therefore, new coordinates will be,

xk  1  xk  1

yk  1  yk  m

 y k  0.80

The intermediate points between A and B are


calculated as given in Table.
Computer Aided Design 1.55

Integer value Real value Integer value


K
xk  1  xk  1 yk  1  yk  m yk  1  yk  m
0 20 – 10
1 19 10.80 11
2 18 11.60 12
3 17 12.40 12
4 16 13.20 13
5 15 14.00 14
6 14 14,80 15
7 13 15.60 16
8 12 16.40 16
9 11 17.20 17
10 10 18.00 18

24

22

20

(1 0,1 8 )
18

16
A c tu al line
14

12

(2 0,1 0 )
10

10 12 14 16 18 20 22 24
Fig. Plotted lin e
1.56 Computer Aided Design www.airwalkpublications.com

1.17.2 Bresenham’s line drawing algorithm


Bresenham’s line drawing algorithm rectifies the
disadvantage of digital differential analyzer algorithm.

Bresenham’s developed an accurate and efficient


method of raster generation algorithms to display lines,
circles, ellipse and other curves incorporating only
incremental integer calculation.

The features of Bresenham’s line drawing algorithm


are given below:

(i) The line generated by Bresenham’s technique uses


standard equation of line y  mx  c.
 A non-negative integer x, y coordinate pair access
each pixel.
 Line always starts from left irrespective of the
input from the user. Bresenham’s algorithm
decides the one which is lying on the left as
starting point.

1.17.3 Procedure for line generation when slope


m1

i.e. slope is between 0 and 45


Step: 1

Input the line end points AB as x1, y1 and x2, y2
respectively.

Step: 2

Plot the first end point x1, y1 which means load the
point into the frame buffer.
Computer Aided Design 1.57

Step: 3

Calculate the initial value of decision parameters,


P k i.e. P o

 x  x 2  x1

 y  y 2  y1

P o  2 y   x

Step: 4

At each xk position, starting from K  0, perform the


following test:

If P  1 (negative), the next position for plotting the


pixel is xk  1, yk and P k  1  Pk  2 y.

If P1 (positive) the next pixel position is


xk  1, yk  1 and P k  1  Pk  2 y  2 x

Step: 5

Plot the point of current x, y position.

Step: 6

Repeat step 4 through step 5,  x times until the


second end point is reduced i.e. x  x2.

1.17.4 Procedure for generating the line when slope


m1

(i.e) slope is between 45 and 90


The procedure is same except that x and y coordinates
are interchanged.
1.58 Computer Aided Design www.airwalkpublications.com

Step: 1

Input the line end points AB as x1, y1 and x2, y2
respectively.

Step: 2

Plot the first end point x1, y1 which means load the
point into the frame buffer.

Step: 3

Calculate the initial value of the decision parameter


P k (i.e) P o.

 x  x 2  x1

 y  y 2  y1

P o  2 x   y

Step: 4

At each xk position, from K  0, perform the following


test:

If P k  1 (negative) the next position to plot the pixel


is xk, yk  1 and P k  1  P k  2 x

If Pk  1 (positive) the next pixel position is,


xk  1, yk  1 and P k  1  P k  2 x  2 y

Step: 5

Plot the point of current x, y position


Computer Aided Design 1.59

Step: 6

Repeat step 4 through step 5,  y times until reaching


the second end point. i.e, y  y2.

Problem 1.8: Draw the line using Bresenham’s algorithm


with the end points A (18,8) and B (28,16).

Given data
x 1  18; y1  8

x 2  28; y2  16

To find
Obtain the line using Bresenham’s algorithm.
Solution
 x  x2  x1  28  18  10

 y  y2  y1  16  8  8

y 8
Slope, m    0.80
 x 10

Since slope m  1 and positive


Then,
P o  2 y   x

successive values of the decision parameter,


P k  1  P k  2 y  2 x  yk  1  y k

If P k  1, the next pixel position to plot is


xk  1, yk and P k  1  Pk  2 y

Otherwise P k  1, the next pixel position is


xk  1, yk  1 and P k  1  Pk  2 y  2 x
1.60 Computer Aided Design www.airwalkpublications.com

Value of Value
Decision
decision of
K parameter Next pixel
parameter next
Pk
Pk pixel
0 P0  2 y   x 2 8  10  6 xk  1, yk  1 (19,9)
1 P1  P0  2 y  2 x 6  2 8  2 10  2 xk  1, yk  1 (20,10)
2 P2  P1  2 y  2 x 2  2 8  2 10   2 xk  1, yk (21,10)
3 P3  P2  2 y  2  2 8  14 xk  1, yk  1 (22,11)
4 P4  P3  2 y  2 x 14  2 8  2 10  10 xk  1, yk  1 (23,12)
5 P5  P4  2 y  2 x 10  2 8  2 10  6 xk  1, yk  1 (24,13)
6 P6  P5  2 y  2 x 6  2 8  2 10  2 xk  1, yk  1 (25,14)
7 P7  P6  2 y  2 x 2  2 8  2 10   2 xk  1, yk (26,14)
8 P8  P7  2 y  2  2 8  14 xk  1, yk  1 (27,15)
9 P9  P8  2 y  2 x 14  2.8  2 10  10 xk  1, yk  1 (28,16)

22

20

18
(2 8,1 6 )
P ixe l N o

16 B

14
y

12
A ctu al L ine
10

8
A (1 8,8 )

16 18 20 22 24 26 28 30
x P ixe l N o
Computer Aided Design 1.61

1.18 CLIPPING
Various projections of an object geometry can be
obtained by defining views. If any part of the geometry is
not inside the window, it is made invisible by the graphics
software through a process known as clipping.

Any geometry lying wholly outside the view boundary


is not mapped to the screen and any geometry lying
partially inside and partially outside is cut off at the
boundary before being mapped.

If clipping is not done properly, a CAD/CAM system


will produce incorrect pictures, due to overflow of internal
coordinate registers. This effect is known as wrapround.
The examples of clipping is shown in Fig. 1.15.

Clipping is an important feature of the viewing


transformation. Thus the process of hiding a portion of the
image, which is outside the viewport boundary, is termed
clipping.

Alternatively, it is the process of determining the


portion of an image lying within a region called clip region.
The clip region is typically either a window on a screen or
clip volume.

Clipping algorithm identifies those portions of the


image that are either inside or outside the specified display
surface.

The specified surface generally rectangular, for


clipping on the screen is called clipped window. Fig. 1.15,
1.16 shows the primitives being clipped.

 Since complex images consist of thousands of


small line segments, efficient clipping is necessary
1.62 Computer Aided Design www.airwalkpublications.com

A2 C lip W ind ow
A1

A3
B1
C lipp in g

B3
A4
B2

B4
Fig:1.15 C lipp ing of a o ne D im ension al Elem ent - Line

C lipp in g

Fig:1.16 C lipp ing of a Tw o D im ensiona l Elem ent - Filled P olygon s

to reduce the time required for generating the


images. Several researchers have developed line
clipping and polygon clipping algorithms for the
computer graphics.

1.19 VIEWING TRANSFORMATION

The complex drawings of an object or element in


world coordinate system has become very difficult to
visualize. In such cases a window is required to visualize
portions of the drawing on the display surface.

The selected area in the world space, with the sides


parallel to x and y directions of the world coordinate
Computer Aided Design 1.63

system, is called a window, and method of selecting and


enlarging portions of drawing on the display is termed
windowing.
On the display surface the image lies within the
window.
Thus viewing transformation is capable of displaying
generated images the way the user wants to present. This
function set provides the user with the ability to view the
image from the desired angle and at the desired
magnification.
In windowing transformation, the graphics screen
behaves as a window for display of the application model.
In windowing process we may not use the entire screen for
display, but we see the area within a box. Such box is
called as viewport.

Im a ge in M ap ping to M ap ping To
W orld C oo rdin ate N orm alized D evice C o ord ina te
S ystem C oordin ate S yste m S ystem
W indo w N orm alized V iew Po rt V ie w P o rt

Fig:1.17 View ing Transform ation of Im age

Fig. 1.17 shows different stages of the viewing


transformation from windows to viewport.
In fact, viewing transformation is the process of
mapping coordinates/points from window onto the viewport.
Viewing transformation is the operation of a
transformation matrix on the coordinates of every point of
the object.
1.64 Computer Aided Design www.airwalkpublications.com

y W ind ow - I

Vie w Po rt Vie w Po rt
I II

W ind ow - II
x
W orld C oo rd inate s D e vice C o ordin ates
Fig:1.18. (a) Different W indows on Different View ports

Vie w Po rt Vie w Po rt
I II

W ind ow
x
W orld C oo rd inate s D e vice C o ordin ates

Fig:1.18. (b) Sam e Wind ow on D ifferent Viewports

Fig. 1.18 shows the windowing operation to display


certain areas of the image on different viewports.

1.20 POSSIBLE PART : B QUESTIONS


1. With a neat sketch explain the product cycle.
2. What is design process? Draw flow diagram and
explain functions.
3. Compare sequential and simultaneous engineering.
4. Define CAD? Role of computers in CAD? Draw flow
diagram of CAD.
5. What are the benefits of CAD.
Computer Aided Design 1.65

6. Write the engineering applications of CAD.


7. Draw and explain the CAD system architecture.
8. Explain different types of coordinate representation
system.
9. With an example, explain each type of two dimensional
transformation.
10. Explain homogeneous coordinate transformation system
and matrix.
11. Explain the techniques involved in line drawing
algorithm.
12. Explain viewing transformation system.

Das könnte Ihnen auch gefallen