Professional Documents
Culture Documents
INTRODUCTION TO CAD
Course Contents
1.1 Introduction
1.2 Reasons for Implementing a
CAD System
1.3 Conventional Design Process
1.4 Conventional Design vs CAD
1.5 Benefits of CAD
1.6 Limitations of CAD
1.7 CAD/CAM Systems
Evaluation Criteria
1.8 CAD Hardware
1.9 CAD Softwares
1.10 Coordinate Systems
1.11 DDA (Digital Differential
Analyser) Line Algorithm
1.12 Bresenham’s Line Algorithm
1.13 Mid Point Circle Algorithm
1.14 Database Management
System (DBMS)
1.15 Graphics Exchange standards
1.1 Introduction
• In engineering practice, CAD/CAM has been utilized in different ways by different
people.
• Some utilize it to produce drawings and document designs.
• Others may employ it as a visual tool by generating shaded images and animated
displays.
• A third group may perform engineering analysis of some sort on geometric models
such as finite element analysis.
• A fourth group may use it to perform process planning and generate NC part
programs. In order to establish the scope and definition of CAD/CAM in an
engineering environment and identify existing and future related tools, a study of a
typical product cycle is necessary. Figure 1.1 shows a flowchart of such a cycle.
• Designers will always require tools that provide them with fast and reliable solutions
to design situations that involve iterations and testings of more than one alternative.
• CAD tools can vary from geometric tools, such as manipulations of graphics entities
and interference checking, on one extreme, to customized applications programs,
such as developing analysis and optimization routines, on the other extreme.
• In between these two extremes, typical tools currently available include tolerance
analysis, mass property calculations and finite element modeling and analysis.
Fig. 1.3 Definition of CAD tools based on their implementation in a design environment
• CAD tools, as defined above, resemble guidance to the user of CAD technology.
• The definition should not and is not intended to, represent a restriction on utilizing it
in engineering design and applications. The principal purposes of this definition are
the following:
1. To extend the utilization of current CAD/CAM systems beyond just drafting
and visualization.
2. To customize current CAD/CAM systems to meet special design and analysis
needs.
There are six steps involved in the conventional design process as discussed below:
1. Recognition of need
• The first step in the designing process is to recognize necessity of that particular
design.
• The condition under which the part is going to operate and the operation of part in
that particular environment.
• The real problem is identified by knowing the history and difficulties faced in system.
2. Definition of problem
• The design involves type of shape of part, its space requirement, the material
restrictions and the condition under which the part has to operate.
• The basic purpose of design process has to be known before starting the design.
• A problem may be design of a simple part or complex part.
• It may be problem on optimizing certain parameters.
3. Synthesis of design
• In this, it may be necessary to prepare a rough drawing of design part.
• The type of loading conditions imposed on the parts.
• The type of shapes which the part section can require and approximate dimension at
which the different forces are located has to be provided on the sketch of part.
• The stresses to which the part is likely to be subjected must be analyzed and relevant
formulas should be prepared.
• A mathematical model of design may be prepared to synthesize the parts of design.
4. Analysis and optimization
• The design can be analyzed for the type of loading condition as well as the geometric
shape of the part.
• In the first stage it will be necessary to check the design of the part for safe stresses.
• If it is not satisfactory, then the dimensions of the part can be recalculated.
• The part can further be optimized for acquiring minimum dimensions, weight,
volume, efficiency of the material and cost.
• The optimization depends on the definition of the problem and importance of a
parameter.
• It may be sometimes necessary to optimize the parts for certain operating
parameters like efficiency, torque, etc.
5. Evaluation
• It is concerned with measuring the design against the specifications established in
the problem definition phase.
• The evaluation often requires the fabrication and testing of model to assess
operating performance, quality and reliability.
6. Presentation
• The design of component must be presented along with necessary drawings in an
attractive format.
• The presentation of the design can be made by use of colors and attractive
presentation.
• In contrast to many selection guidelines that may vary sharply from one organization
to another, the technical evaluation criteria are largely the same. They are usually
based on and are limited by the existing CAD/CAM theory and technology. These
criteria can be listed as follows.
1.7.1. System Considerations
(i) Hardware
• Each workstation is connected to a central computer, called the server, which has
enough large disk and memory to store users' files and applications programs as well
as executing these programs.
(ii) Software
• Three major contributing factors are the type of operating system the software runs
under, the type of user interface (syntax) and the quality of documentation.
(iii) Maintenance
• Repair of hardware components and software updates comprise the majority of
typical maintenance contracts. The annual cost of these contracts is substantial
(about 5 to 10 percent of the initial system cost) and should be considered in
deciding on the cost of a system in addition to the initial capital investment.
(iv) Vendor Support and Service
• Vendor support typically includes training, field services and technical support. Most
vendors provide training courses, sometimes on-site if necessary.
1.7.2. Geometric Modeling Capabilities
(i) Representation Techniques
• The geometric modeling module of a CAD/CAM system is its heart. The applications
module of the system is directly related to and limited by the various
representations it supports. Wireframes, surfaces and solids are the three types of
modeling available.
(ii) Coordinate Systems and Inputs
• In order to provide the designer with the proper flexibility to generate geometric
models, various types of coordinate systems and coordinate inputs ought to be
provided. Coordinate inputs can take the form of cartesian (x, y, z), cylindrical (r, θ, z)
and spherical (θ, φ, z).
(iii) Modeling Entities
• The fact that a system supports a representation scheme is not enough. It is
important to know the specific entities provided by the scheme. The ease to
generate, verify and edit these entities should be considered during evaluation.
(iv) Geometric Editing and Manipulation
• It is essential to ensure that these geometric functions exist for the three types of
representations. Editing functions include intersection, trimming and projection and
manipulations include translation, rotation, copy, mirror, offset, scaling and changing
attributes.
(v) Graphics Standards Support
• If geometric models' databases are to be transferred from one system to another,
both systems must support exchange standards.
1.7.3. Design Documentation
(i) Generation of Engineering Drawings
• After a geometric model is created, standard drafting practices are usually applied to
it to generate the engineering drawings or the blueprints. Various views (usually top,
front and right side) are generated in the proper drawing layout. Then dimensions
are added, hidden lines are eliminated and/or dashed, tolerances are specified,
general notes and labels are added, etc.
1.7.4. Applications
(i) Assemblies or Model Merging
• Generating assemblies and assembly drawings from individual parts is an essential
process.
(ii) Design Applications
• There are design packages available to perform applications such as mass property
calculations, tolerance analysis, finite element modeling and analysis, injection
modeling analysis and mechanism analysis and simulation.
(iii) Manufacturing Applications
• The common packages available are tool path generation and verification, NC part
programming, postprocessing, computer aided process planning, group technology,
CIM applications and robot simulation.
(iv) Programming Languages Supported
• It is vital to look into the various levels of programming languages a system supports.
Attention should be paid to the syntax of graphics commands when they are used
inside and outside the programming languages. If this syntax changes significantly
between the two cases, user confusion and panic should be expected.
II. Keyboards
• Keyboards are typically employed to create/edit programs or to perform
word processing functions.
• CAD/CAM systems, information entered through keyboards should be
displayed back to the user on a screen for verification.
III. Digitizing Tablets
• There are two basic types of mouse available mechanical and optical.
• The mechanical mouse has roller in order to record the mouse motion in X
and Y directions.
• In optical mouse, movements over the surface are measured by a light beam
modulation techniques.
• The light source is located at the bottom and the mouse must be in contact
with the surface for screen cursor to follow its movement.
V. Joy sticks & Trackballs
• Both the joystick and trackball are used to navigate the screen display cursor.
The user of a trackball can learn quickly how to adjust to any nonlinearity in
its performance.
Fig. 1.12 (a) Cursor Control Devices (b) Thumbwheels as input device with a work station
VI. Thumbwheels
• Two thumbwheels are usually required to control the screen cursor, one for
its horizontal position and other for its vertical position. Each position is
indicated on screen by cross-hair.
4. Output Devices
CAD/CAM applications require output devices such as displays and hardcopy printers.
I. Graphics Displays
• The operation of CRT is based on concept of energizing an electron beam that
strikes the phosphor coating at very high speed.
• The energy transfer from the electron to the phosphor due to the impact
causes it to illuminate and glow.
• The electrons are generated via the electron gun that contains the cathode
and are focused into a beam via the focusing unit shown in Fig. 1.13.
• By controlling the beam direction and intensity in a way related to the
graphics information generated in the computer, meaningful and desired
graphics can be displayed on the screen.
• Once displayed, the picture remains on the screen until it is erased. New
picture items can be added & displayed rapidly.
• However, if a displayed item is erased, the entire screen must be cleared and
new picture displayed to reflect removal of item.
Raster display
• The inability of the DVST to meet the increasing demands by various
CAD/CAM applications for colors, shaded images and animation motivated
hardware designers to continue searching for solution.
• In raster displays, display screen area is divided horizontally and vertically
into a matrix of small element called pixel.
• An N x M resolution defines a screen with N rows and M columns.
• Figure 1.18 shows how the pixel value is related to the lookup table in an
eight plane display. If cell P in the bit map corresponds to pixel P at the
location P(x, y) on the screen, then the gray level of this pixel is 50
(00110010) or its corresponding color is 50.
• For color displays this may imply that the number of bits per pixel must be
increased to increase the number of entries in the color map and therefore
increase the available number of colors to the user.
• This, however, is not true and leads to increasing the size of the bit map
memory and the cost of the display. Thus, how can the number of color
indexes in the color map increase while keeping the pixel definition (number
of bits per pixel) in the bit map to a minimum?
• For example, how can a display have 4 bits/pixel with 24 bits of color output
(224 different colors)? This is achieved by designing a color map with 224 (16.7
million) available color indexes. The 4 bits/pixel provides 16 (2 4 simultaneous
colors, in an image, which can be chosen from the color map.
• A pixel value (0 to 15) can be used to set the value of the color index which
corresponds to the proper color to be displayed. This scheme, in this
example, provides 16 simultaneous colors from a palette of 16.7 million.
• To the user, the color map is made available where colors are chosen and the
application program relates the chosen color to the proper pixel value. For
example, if the user chooses the color purple for an image element, the
corresponding program sets the corresponding pixels to reflect the color
purple.
Light Emitting Diode (LED)
• Light Emitting Diode (LED) is a emissive device. The emissive displays (or
emitters) are devices that convert electrical energy into light.
• A matrix of diodes is arranged to form the pixel positions in the display, and
picture definition is stored in a refresh buffer.
• In the flat-bed plotter, the paper is stationary and the pen holding
mechanism can move in two axes.
Laser printer
• A semiconductor laser beam scans the electro statically charged drum
with a rotating mirror.
• This writes on the drum a no. of points which are similar to pixels.
• When the beam strikes the drum in the wrong way round for printing
a positive charge, reversing it, then toner powder is released.
• The toner powder sticks to the charged positions of the drum, which
is then transformed to a sheet of paper.
• Though it is relatively expansive compared to the dot matrix printer,
the quality of the output is extremely good and it works very fast.
y2 y1
m (1.2)
x2 x1
C = y1 – m x1 (1.3)
• The line drawing method would have to make use of the above three equations in
order to develop a suitable algorithm.
• Equation 1.1, for small increments can also be written as,
Y mX (1.4)
• By taking a small step for ∆X, ∆Y can be computed using Eq. 1.4. However, the
computations become unnecessarily long for arbitrary values of ∆X. Let us now
workout a procedure to simplify the calculation method.
• Let us consider a case of line drawing where m 1 . Choose an increment for ∆X as
unit pixel. Hence ∆X = 1.
• Then from Eq. 1.4,
yi 1 yi m (1.5)
• The subscript i takes the values starting from 1 for the starting point till the end point
is reached.
• Hence it is possible to calculate the total pixel positions for completely drawing the
line on the display screen. This is called DDA (Digital Differential Analyser) algorithm.
• If m > 1, then the roles of x and y would have to be reversed.
• Choose
∆Y = 1 (1.6)
Then from Eq. 1.4, we get
1
x i 1 x i (1.7)
m
• The following is the flow chart showing the complete process for the implementation
of the above procedure.
Fig. 1.27 Flow chart for line calculation procedure by DDA algorithm
Example 1.1
Indicate which raster locations would be chosen by DDA algorithm when scan converting a
line from screen coordinate (19, 38) to screen coordinate (38, 52).
y y2 y1 52 38 14
m 0.737
x x2 x1 38 19 19
So, m 1
∆X = 1 and yi 1 yi m
Table 1.1 Calculation of pixel positions by DDA Algorithm
X Y calculated Y rounded
19 38 38
20 38.737 39
21 39.474 39
22 40.211 40
23 40.948 41
24 41.685 42
25 42.422 42
26 43.159 43
27 43.896 44
28 44.633 45
29 45.370 45
30 46.107 46
31 46.844 47
32 47.581 48
33 48.318 48
34 49.055 49
35 49.792 50
36 50.529 51
37 51.266 51
38 52.003 52
Fig. 1.28 the Position of Individual Pixels for Calculation using Bresenham Procedure
• These are shown in Fig. 1.28. Let d1 and d2 be two parameters, which indicate where
the next pixel is to be located. If d1 is greater than d2, then the y pixel is to be located
at the +1 position else, it remains at the same position as previous location.
d1 y yi m(xi 1) C yi (1.11)
d2 yi 1 y yi 1 m(xi 1) C (1.12)
• Equation 1.14 still contains more computations and hence we would now define
another parameter P which would define the relative position in terms of d1 – d2.
Pi (d1 d2 )x (1.15)
2m(xi 1) 2C 2yi 1 x
2mxi x 2mx 2C x 2yi x x
y y y
2 xi x 2 x 2C x 2yi x x m
x x x
2xi y 2y 2C x 2yi x x (1.16)
Pi 2xi y 2yi x b (1.17)
where, b 2y 2C x x
• Taking the difference of two successive parameters, we can eliminate the constant
terms from Eq. (1.18).
Pi 1 Pi 2yxi 2y 2x(yi 1 ) 2yxi 2xyi
y
P1 2x1y 2y 2 y1 x1 x 2y1x x
x
P1 2x1y 2y 2y1x 2x1y 2y1x x
• Hence from Eq. 1.19, when Pi is negative, then the next pixel location remains the
same as previous one and Eq. 1.21 becomes valid. Otherwise, Eq. 1.22 becomes
valid.
• Using these equations it is now possible to develop the algorithm for drawing the
line on the screen as shown in the flowchart (Fig. 1.29). The procedure just described
is for the case when m 1.
• The procedure can be repeated for the case when m > 1 by interchanging X and Y
similar to the DDA algorithm.
Fig. 1.29 Flow chart for line calculation procedure by Bresenham algorithm
Example 1.2
Indicate which raster locations would be chosen by Bresenham’s algorithm when scan
converting a line from screen coordinate (19, 38) to screen coordinate (38, 52).
y y2 y1 52 38 14
m 0.737
x x2 x1 38 19 19
Table 1.2 Calculation of pixel positions by Bresenham’s Procedure
X P Y
19 P1 = 2∆y - ∆x = 28 – 19 = 9 38
20 P2 = P1 + 2∆y - 2∆x = 9 + 28 -38 = -1 39
21 P3 = P2 + 2∆y = -1 + 28 = 27 39
22 P4 = P3 + 2∆y - 2∆x = 27 + 28 -38 = 17 40
23 P5 = P4 + 2∆y - 2∆x = 17 + 28 -38 = 7 41
24 P6 = P5 + 2∆y - 2∆x = 7 + 28 -38 = -3 42
25 P7 = P6 + 2∆y = -3 + 28 = 25 42
26 P8 = P7 + 2∆y - 2∆x = 25 + 28 -38 = 15 43
27 P9 = P8 + 2∆y - 2∆x = 15 + 28 -38 = 5 44
28 P10 = P9 + 2∆y - 2∆x = 5 + 28 -38 = -5 45
29 P11 = P10 + 2∆y = -5 + 28 = 23 45
30 P12 = P10 + 2∆y - 2∆x = 23 + 28 -38 = 13 46
31 P13 = P12 + 2∆y - 2∆x = 13 + 28 -38 = 3 47
32 P14 = P13 + 2∆y - 2∆x = 3 + 28 -38 = -7 48
33 P15 = P14 + 2∆y = -7 + 28 = 21 48
34 P16 = P15 + 2∆y - 2∆x = 21 + 28 -38 = 11 49
35 P17 = P16 + 2∆y - 2∆x = 1 + 28 -38 = 1 50
36 P18 = P17 + 2∆y - 2∆x = 1 + 28 -38 = -9 51
37 P19 = P18 + 2∆y = -9 + 28 = 19 51
38 P20 = P19 + 2∆y - 2∆x = 19 + 28 -38 = 9 52
Fig. 1.30
• Figure 1.30 shows the midpoint between the two candidate pixels at sampling
position xk + 1.
• Assuming we have just plotted the pixel at (xk, yk), we next need to determine
whether the pixel at position (xk + 1, yk) or the one at position (xk + 1, yk - 1) is closer
to the circle. Our decision parameter is the circle function Eq. 1.24 evaluated at the
midpoint between these two pixels:
1
pk fcircle xk 1, yk
2
2
(3-29)
1
xk 1 yk r
2 2
2
• If Pk < 0, this midpoint is inside the circle and the pixel on scan line yk is closer to the
circle boundary. Otherwise, the midposition is outside or on the circle boundary, and
we select the pixel on scan line yk – 1.
• Successive decision parameters are obtained using incremental calculations. We
obtained a recursive expression for the next decision parameter by evaluating the
circle function at sampling position xk+1 + 1 = xk + 2:
1
pk 1 fcircle xk 1 1, yk 1
2
2
1
xk 1 1 yk 1 r 2
2
2
pk 1 pk 2 xk 1 y 2k 1 y 2k yk 1 yk 1
Where yk+1 is either yk or yk-1, depending on the sign of pk.
• Increments for obtaining
pk+1 = pk + 2xk+1 +1 (if pk is negative)
pk+1 = pk + 2xk+1 + 1 – 2yk+1
Evaluation of the terms 2xk+1, and 2yk+1 can also be done incrementally as
2xk+1 = 2xk + 2
2yk+1 = 2yk – 2
• At the start position (0, r), these two terms have the values 0 and 2r, respectively.
Each successive value is obtained by adding 2 to the previous value of 2x and
subtracting 2 from the previous value of 2y.
• The initial decision parameter is obtained by evaluating the circle function at the
start position (xo, yo) = (0, r):
1
po fcircle 1, r
2
2
1
1 r r2
2
5
Or po r
4
• If the radius r is specified as an integer, we can simply round p o to
po = 1 – r (for r an integer)
since all increments are integers.
Course Contents
2.1 Curve representation
2.2 Classification of curves
2.3 Parametric representation of
analytical curves
2.3.1. Line
2.3.2. Circle
2.3.3. Ellipse
2.3.4. Parabola
2.3.5. Hyperbolas
2.4 Conics
2.5 Parametric representation of
synthetic curve
2.5.1. Hermite cubic spline
2.5.2. Bezier curves
2.5.3. B-spline curves
2.6 Surface modeling
(a) Interploation
(b) Approximation
Fig. 2.1 Interpolant and Approximated Curves
Synthetic curve pass through defined data points and can thus represented by
polynomial equations.
The parametric form for any synthetic curve is:
P u C3u3 C2u2 C1u C0
where, u = Parameter and Ci = Polynomial coefficients
2.3 Parametric representation of analytical curve
Lines
A line can be represented in a parametric form by an input of two endpoints or by
one point and a length and direction. Besides these, modifiers and filters can be used
to represent these lines. The two important methods of establishing equations for
lines are considered.
A line connecting two endpoints in parametric form, having the values of
parameter u as 0 and 1 at the endpoints:
P P1 P2 P1
u 1
P P1 u P2 P1
P P1 u P2 P1 where, 0 ≤ u ≤ 1
This equation represents the vector equation of the line in parametric form. In scalar
form, it can be written as:
x x1 u x2 x1
y y1 u y2 y1
z z1 u z2 z1 where, 0 ≤ u ≤ 1
Any point on the above line or its extension can be found by substituting the value of
parameter u. The tangent vector of the line would be represented by :
P ' P2 P1
In scalar form these would have the coordinates expressed by the following
equations:
x ' x2 x1
y ' y2 y1
z ' z2 z1
It can be seen that the tangent vector is independent of the parameter u, thus
representing the constant slope of the line. Above equations are sufficient to
represent all properties of the line for CAD/CAM representation. The length L and
direction vector n can be calculated using the following equations :
L P2 P1
x2 x1 y2 y1 z2 z1
2 2 2
P2 P1
n
L
A line passing through a point and defined by a length and direction:
Consider a case, where a line is to pass through a point P1 and has its length L and
direction vector n defined as input as shown in Fig. 2.3. The computation of the
endpoint of this line needs to be done based on the above inputs. As seen earlier,
P P1
n
L
P P1 L n
where, -∞ ≤ L ≤ ∞
Once the user inputs P1, L and n , the endpoint can be calculated as per the above
equation. The two endpoints can then be expressed in parametric form with values
of parameter u as 0 and 1.
Fig. 2.3 Line passing through a point and defined by a Length and Direction
Parallel Lines
Fig. 2.4
Assume that the existing line has the two endpoints P1 and P2, a length L1, and a
direction defined by the unit vector n1 . The new line has the same direction n1 , a
length L2 and endpoints P3 and P4.
The unit vector n1 is given by
P2 P1
n
L1
The unit vector for the parallel line will be same as unit vector for the existing line.
P4 P3
n
L2
P4 P3 L2 n
The equation of parallel line becomes,
P P3 u P4 P3
Fig. 2.5
Fig. 2.5 represents two lines L1 and L2 having endpoints are P1, P2 and P3, P4, the
angle measurement command uses the equation
(P P ) (P P )
cos 2 1 4 3
|P2 P1 ||P4 P3 |
cosθ = L1 . L2
Distance of a point from line
Fig. 2.6
Fig. 2.6 shows the distance D from point P3 to the line whose endpoints are P1 and P2
and direction is n . Its length is L. D is given by
(P3 P1 )
D (P3 P1 ) n (P3 P1 )
|P3 P1 |
Example 2.1: For the position vectors P1[1 2] and P2[4 3], determine the parametric
representation of line segment between them. Also determine the slope and tangent vector
of line segment.
A parametric representation of line is
P P1 u P2 P1
= [1 2] + u ([4 3] – [1 2])
= [1 2] + u [3 1]
Parametric representation of x and y components are
x(u) = x1 + u (x2 – x1)
= 1 + 3u
y(u) = y1 + u (y2 – y1)
=2+u
The tangent vector is obtained by differentiating P(u)
P’(u) = *x’(u) y’(u)+
= [3 1]
The slope of line segment is
dy dy / du
dx dx / du
y'
x'
1
3
Example 2.2 : The end points of line are P1(1,3,7) and P2(–4,5, –3). Determine
i. Tangent vector of the line
ii. Length of line
iii. Unit vector in the direction of line
Parametric representation of x, y and z components are
x(u) = x1 + u (x2 – x1)
= 1 – 5u
y(u) = y1 + u (y2 – y1)
= 3 + 2u
z(u) = z1 + u (z2 – z1)
= 7 – 10u
Tangent vector, P’(u) = *x’(u) y’(u) z’(u)+
= [–5 2 –10]
= –5i + 2j –10k
Length of line, L P2 P1
x2 x1 y2 y1 z2 z1
2 2 2
4 1 5 3 3 7
2 2 2
= 11.358
P2 P1 P2 P1
Unit vector in the direction of line, n
P2 P1 L
1
[5 2 10]
11.358
= [–0.44 0.176 –0.88]
= –0.44i + 0.176j –0.88k
Example 2.3: A line is represented by the end point P1(2, 4, 6) and P2(-3, 6, 9). If the value of
parameter u at P1 and P2 is 0 and 1 respectively, determine the tangent vector for the line. Also
determine the coordinate of a point represented by; u equal to 0, 0.25, -0.25, 1 and 1.5. Also find the
length and unit vector of line between two points P1 and P2.
Parametric representation of x, y and z components are
x(u) = x1 + u (x2 – x1)
= 2 – 5u
y(u) = y1 + u (y2 – y1)
= 4 + 2u
z(u) = z1 + u (z2 – z1)
= 6 – 3u
Tangent vector, P’(u) = *x’(u) y’(u) z’(u)+
= [–5 2 –3]
= –5i + 2j –3k
u 0 0.25 – 0.25 1 1.5
x (u) 2 0.75 3.25 –3 –5.5
y (u) 4 4.5 3.5 6 7
z (u) 6 5.25 6.75 3 1.5
Length of line, L P2 P1
x2 x1 y2 y1 z2 z1
2 2 2
3 2 6 4 9 6
2 2 2
= 6.16
P2 P1 P2 P1
Unit vector in the direction of line, n
P2 P1 L
1
[5 2 3]
6.16
= [–0.81 0.324 –0.487]
= –0.81i + 0.324j –0.487k
Circles
Example 2.4: The two endpoints of diameter of a circle are P1(13,15,7) and P2(35,40,7).
Determine the centre and radius of circle.
1
The centre of a circle, Pc P1 P2
2
x x y y z1 z2
xc yc zc 1 2 1 2
2 2 2
13 35 15 40 7 7
xc y c zc
2 2 2
xc yc zc 24 27.5 7
The radius of circle
R
1
2 x2 x1 y2 y1 z2 z1
2 2 2
R
1
2 35 13 40 15 7 7
2 2 2
R 16.65
Ellipse
Mathematically the ellipse is a curve generated by a point moving in space such that
at any position the sum of its distances from two fixed points (foci) is constant and
equal to the major diameter. Each focus is located on the major axis of the ellipse at a
distance from its center equal to A2 B2 (A and B are the major and minor radii).
Circular holes and forms become ellipses when they are viewed obliquely relative to
their planes.
If a line parallel to the minor axis is drawn from P1 and a line parallel to the major axis
is drawn from P2, the intersection of these two lines defines the point P.
x xc A cos u
y yc B sinu 0 u 2
z zc
Similar development as in the case of a circle results in the following recursive
relationships which are useful for generating points on the ellipse for display
purposes without excessive evaluations of trigonometric functions:
A
xn1 xc (xn xc ) cos u (yn yc ) sin u
B
A
yn1 yc (yn yc ) cos u (xn xc ) sin u (2.8)
B
z n 1 z n
If the ellipse major axis is inclined with an angle α relative to the x axis as shown in
Fig. 2.8, the ellipse equation becomes
x xc A cos u cos B sinu sin
y yc A cos u sin B sinu cos 0 u 2 (2.9)
z zc
Equations (2.9) cannot be reduced to a recursive relationship similar to what is given
by Eqs. (2.8). Instead these equations can be written as
xn1 xc A cos(un u) cos B sin(un u) sin
yn1 yc A cos(un u) sin B sin(un u) cos
z n 1 z n
Parabola
The parabola is defined mathematically as a curve generated by a point that moves
such that its distance from a fixed point (the focus P F) is always equal to its distance
to a fixed line (the directrix) as shown in Fig. 2.9.
The vertex Pv is the intersection point of the parabola with its axis of symmetry. It is
located midway between directrix and focus. Focus lies on the axis of symmetry.
Useful applications of the parabolic curve in engineering design include its use in
parabolic sound and light reflectors, radar antennas and in bridge arches.
Three conditions are required to define a parabola, a parabolic curve, or a parabolic
arc. The default plane of a parabola is the XY plane of the current WCS at the time of
construction.
The database of a parabola usually stores the coordinates of its vertex, distances yHW
and yLW, that define its endpoints as shown in Fig. 2.9, the distance A between the
focus and the vertex (the focal distance) and the orientation angle α.
Unlike the ellipse, the parabola is not a closed curve. Thus, the two endpoints
determine the amount of the parabola to be displayed.
Hyperbolas
A hyperbola is described mathematically as a curve generated by a point moving such
that at any position the difference of its distances from the fixed points (foci) F and F'
is a constant and equal to the transverse axis of the hyperbola.
A C1 curve is the minimum acceptable curve for engineering design. Fig. 2.11 shows a
geometrical interpretation of these orders of continuity.
A cubic polynomial is the minimum order polynomial that can guarantee the
generation of C0, C1, or C2 curves. In addition, the cubic polynomial is the lowest-
degree polynomial that permits inflection within a curve segment and that allows
representation of nonplanar (twisted) three dimensional curves in space.
Higher-order polynomials are not commonly used in CAD/CAM because they tend to
oscillate about control points, are computationally inconvenient and are
uneconomical of storing curve and surface representations in the computer.
The type of input data and its influence on the control of the resulting synthetic
curve determine the use and effectiveness of the curve in design.
For example, curve segments that require positions of control points and/or tangent
vectors at these points are easier to deal with and gather data for than those that
might require curvature information.
Also, the designer may prefer to control the shape of the curve locally instead of
globally by changing the control point(s). If changing a control point results in
changing the curve locally in the vicinity of that point, local control of the curve is
achieved; otherwise global control results.
Major CAD/CAM systems provide three types of synthetic curves: Hermite cubic
spline, Bezier and B-spline curves. The cubic spline curve passes through the data
points and therefore is an interpolant.
Bezier and B-spline curves in general approximate the data points, that is, they do
not pass through them. Under certain conditions, the B-spline curve can be an
interpolant. Both the cubic spline and Bezier curves have a first-order continuity and
the B-spline curve has a second-order continuity.
Hermite Cubic Spline Curve:
They are used to interpolate the given data but not to design free-form curves.
Splines derive their name from “French curves or splines”
It connects two data (end) points and utilizes a cubic equation.
Four conditions are required to determine the coefficients of the equation – two end
points and the two tangent vectors at these two points.
It passes through the control points and therefore it is an Interpolant. It has only up
to C1 continuity.
The curve cannot be modified locally, i.e., when a data point is moved, the entire
curve is affected, resulting in a global control.
The order of the curve is always constant (cubic), regardless of the number of data
points. Increase in the number of data points increases shape flexibility, however, this
requires more data points, creating more splines that are joined together (only two
data points and slopes are utilized for each spline).
2 3 0 1 u3
2 3
0 0 u2
P u P0 P1 P '0 P '1
1 2 1 0 u
1 1 0 0 1
On similar lines, the tangent vector equation can be determined by differentiating
equation (2.20)
P ' u P0 6u2 6u P1 6u2 6u P '0 3u2 4u 1 P '1 3u2 2u
6u2 6u
6u2 6u
P ' u P0 P1 P '0 P '1 2
3u 4u 1
3u 2u
2
0 6 6 0 u3
0 6 6
0 u2
P ' u P0 P1 P '0 P '1
0 3 4 1 u
0 3 2 0 1
Changing the values of endpoints or tangent vectors would modify the shape of the
curve.
Example 2.5: A cubic spline curve has start point P0(16,0) and end point P1(3,1). The tangent
vector for end point P0 is given by line joining P0 and point P2(14,8). Tangent vector for end
P1 is given by line joining P2 and point P1.
1. Determine the parametric equation of hermite cubic curve.
2. Plot the hermite cubic curve.
P0 = [16 0]
P1 = [3 1]
P’0 = P2 – P0 = [14 8] – [16 0]
= [–2 8]
P’1 = P1 – P2 = [3 1] – [14 8]
= [–11 –7]
Parametric equation
For any point on curve
2 3 0 1 u3
2 3
0 0 u2
P u P0 P1 P '0 P '1
1 2 1 0 u
1 1 0 0 1
X coordinate of a point on curve
2 3 0 1 u3
2 3
0 0 u2
Px u P0 x P1 x P '0 x P '1 x
1 2 1 0 u
1 1 0 0 1
2 3 0 1 u3
2 3
0 0 u2
Px u 16 3 2 11
1 2 1 0 u
1 1 0 0 1
u3
2
u
Px u 13 24 2 16
u
1
Px u 13u3 24u2 2u 16
2 3 0 1 u3
2 3
0 0 u2
Py u 0 1 8 7
1 2 1 0 u
1 1 0 0 1
u3
2
u
Py u 1 6 8 0
u
1
Py u u3 u2 8u
Curve plot
The point on curve obtained by varying value of u from 0 to 1 in steps of 0.1 in equ. (2.21)
are shown in table
Point
0 1 2 3 4 5 6 7 8 9 10
No.
U 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
x (u) 16 15.57 14.74 13.59 12.19 10.63 8.97 7.30 5.70 4.24 3.00
y (u) 0 0.74 1.35 1.83 2.18 2.38 2.42 2.32 2.05 1.61 1.00
The Hermite cubic curve plotted using the above coordinates is shown in Fig. 2.13.
Fig. 2.13
Example 2.6: The end point of a cubic spline curve are P 0(1,2) and P1(7,1). The tangent vector
for end P0 is given by line joining P0 and point P2(-2,1). The tangent vector for end P0 is given
by line joining P3(9,-2) and point P1.
1. Determine the parametric equation of hermite cubic curve.
2. Determine the parametric equation for tangent vector.
3. Plot the hermite cubic curve.
P0 = [1 2]
P1 = [7 1]
P’0 = P2 – P0 = [–2 1] – [1 2] = [–3 –1]
P’1 = P1 – P3 = [7 1] – [9 –2] = [–2 3]
2 3 0 1 u3
2 3
0 0 u2
Px u 1 7 3 2
1 2 1 0 u
1 1 0 0 1
u3
2
u
Px u 17 26 3 1
u
1
Px u 17u3 26u2 3u 1
2 3 0 1 u3
2 3
0 0 u2
Py u 2 1 1 3
1 2 1 0 u
1 1 0 0 1
u3
2
u
Py u 4 4 1 2
u
1
Py u 4u3 4u2 u 2
Curve plot
The point on curve obtained by varying the value of u from 0 to 1 in steps of 0.1 in equ.(2.22)
are shown in table
Point
0 1 2 3 4 5 6 7 8 9 10
No.
U 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
x (u) 1 0.94 1.30 1.98 2.87 3.88 4.89 5.81 6.54 6.97 7.00
y (u) 2 1.86 1.67 1.45 1.22 1.00 0.82 0.71 0.69 0.78 1.00
The Hermite cubic curve plotted using the above coordinates is shown in Fig. 2.14.
Fig. 2.14
Bezier Curves:
Cubic splines are based on interpolation techniques. Curves resulting from these
techniques pass through the given points.
Another alternative to create curves is to use approximation techniques which
produce curves that do not pass through the given data points. Instead, these
points are used to control the shape of the resulting curves.
Most often, approximation techniques are preferred over interpolation techniques
in curve design due to the added flexibility and the additional intuitive feel
provided by the former. Bezier and B-spline curves are examples based on
approximation techniques.
As its mathematics show shortly, the major differences between the Bezier curve
and the cubic spline curve are:
1. The shape of Bezier curve is controlled by its defining points only. First derivatives
are not used in the curve development as in the case of the cubic spline. This
allows the designer a much better feel for the relationship between input (points)
and output (curve).
2. The order or the degree of Bezier curve is variable and is related to the number of
points defining it; n + 1 points define an nth degree curve which permits higher-
order continuity. This is not the case for cubic splines where the degree is always
cubic for a spline segment.
3. The Bezier curve is smoother than the cubic spline because it has higher order
derivatives.
Fig. 2.16 Same data points but different orders for Beizer Curve
The curve is also always tangent to first and last segments of polygon.
The same Beizer curve would be generated, if the sequence of the points is
changed from P0 – P1 – P2 – P3 to P3 – P2 – P1 – P0.
The flexibility of the shape would increase with increase in number of vertices
of the polygon.
It is having global control on the shape of the curve.
where P(u) is any point on the curve and P i is a control point. Bi,n are the Bernstein
polynomials. Thus, the Bezier curve has a Bernstein basis. The Bernstein polynomial
serves as the blending or basis function for the Bezier curve and is given by
Bi ,n (u) C (n, i)ui (1 u)ni (2.24)
Utilizing Eqs. (2.24) and (2.25) and observing that C(n, 0) = C(n, n) = 1,
Eq. (2.23) can be expanded to give
P(u) P0 (1 u)n P1C (n,1)u(1 u)n1 P2C (n,2)u2 (1 u)n2
..... Pn1C (n, n 1)un1 (1 u) Pnun , 0 u 1
Example 2.7: A Bezier curve is to be constructed using control points P 0(35,30), P1(25,0),
P2(15,25) and P3(5,10). The Bezier curve is anchored at P 0 and P3. Find the equation of the
Bezier curve and plot the curve for u = 0, 0.2, 0.4, 0.6, 0.8 and 1.
P0 = [35 30]
P1 = [25 0]
P2 = [15 25]
P3 = [5 10]
n=3
The parametric equation for Bezier curve
P(u) (1 u)3 P0 3u(1 u)2 P1 3u2 (1 u)P2 u3P3
The points on curve obtained by varying the value of u = 0, 0.2, 0.4, 0.6, 0.8 and 1 in equ.
(2.26) are shown in below table
Point No. 0 2 4 6 8 10
u 0 0.2 0.4 0.6 0.8 1
Px (u) 35.0 29.0 23.0 17.0 11.0 5.00
Py (u) 30.0 17.84 14.32 14.88 14.96 10.00
The Bezier curve plotted using the above coordinates is shown in Fig. 2.18.
Fig. 2.18
Example 2.8: Plot a Bezier curve using the following control points.
(2,0), (4,3), (5,2), (4,-2), (5,-3) and (6,-2).
P0 = [2 0] P1 = [4 3]
P2 = [5 2] P3 = [4 -2]
P4 = [5 -3] P5 = [6 -2]
n=5
The parametric equation for Bezier curve with 6 control points
P(u) (1 u)5 P0 5u(1 u)4 P1 10u2 (1 u)3P2 10u3 (1 u)2 P3 5u4 (1 u)P4 u5P5
P(u) (1 5u 10u2 10u3 5u4 u5 )P0 5u(1 4u 6u2 4u3 u4 )P1
10u2 (1 3u 3u2 u3 )P2 10u3 (1 2u u2 )P3 5u4 (1 u)P4 u5P5
P(u) (1 5u 10u2 10u3 5u4 u5 )P0 (5u 20u2 30u3 20u4 5u5 )P1
(10u2 30u3 30u4 10u5 )P2 (10u3 20u4 10u5 )P3 (5u4 5u5 )P4 u5P5
P(u) P0 (5P0 5P1 )u (10P0 20P1 10P2 )u2 (10P0 30P1 30P2 10P3 )u3
(5P0 20P1 30P2 20P3 5P4 )u4 (P0 5P1 10P2 10P3 5P4 P5 )u5
X-coordinate of a point on a curve
Px (u) P0 x (5P0 x 5P1 x )u (10P0 x 20P1 x 10P2 x )u2 (10P0 x 30P1 x 30P2 x 10P3 x )u3
(5P0 x 20P1 x 30P2 x 20P3 x 5P4 x )u4 (P0 x 5P1 x 10P2 x 10P3 x 5P4 x P5 x )u5
Px (u) 2 (5(2) 5(4))u (10(2) 20(4) 10(5))u2 (10(2) 30(4) 30(5) 10(4))u3
(5(2) 20(4) 30(5) 20(4) 5(5))u4 ((2) 5(4) 10(5) 10(4) 5(5) (6))u5
Px (u) 2 10u 10u2 10u3 25u4 11u5
Y-coordinate of a point on a curve
Py (u) P0 y (5P0 y 5P1y )u (10P0 y 20P1y 10P2 y )u2 (10P0 y 30P1y 30P2 y 10P3y )u3
(5P0 y 20P1y 30P2y 20P3y 5P4 y )u4 (P0 y 5P1y 10P2y 10P3y 5P4 y P5y )u5
Py (u) 0 (5(0) 5(3))u (10(0) 20(3) 10(2))u2 (10(0) 30(3) 30(2) 10(2))u3
(5(0) 20(3) 30(2) 20(2) 5(3))u4 ((0) 5(3) 10(2) 10(2) 5(3) (2))u5
Py (u) 15u 40u2 10u3 25u4 12u5
The parametric equation of Bezier curve
Px (u) 2 10u 10u2 10u3 25u4 11u5
(2.27)
Py (u) 15u 40u2 10u3 25u4 12u5
The points on curve obtained by varying the value of u from 0 to 1 in steps of 0.1 in
equ.(2.27) are shown in below table
Point No. 0 1 2 3 4 5 6 7 8 9 10
u 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Px (u) 2 2.89 3.56 4.01 4.29 4.47 4.62 4.82 5.12 5.52 6.00
Py (u) 0 1.11 1.52 1.34 0.76 -0.06 -0.93 -1.68 -2.17 -2.29 -2.00
Fig. 2.19
B-Spline Curve:
B-Spline curves are proper and powerful generalization of Bezier curve.
They are very similar to Bezier curve and are also defined with the help of
characteristic polygon.
The major advantage of B-Spline curve is due to its ability to control the curve
shape locally, as opposed to global control (see Fig. 2.20).
Ni,k(u) are the B-spline functions. Thus, the B-spline curves have a B-spline basis.
Rational curves
A rational curve is defined by the algebraic ratio of two polynomials while a
nonrational curve is defined by one polynomial.
The formulation of rational curves requires the introduction of homogeneous
space and the homogeneous coordinates. The homogeneous space is four-
dimensional space. A point in three dimensional with coordinates (x, y, z) is
represented in the homogeneous space by the coordinates (x*, y*, z*, h),where h
is a scalar factor. The relationship between the two types of coordinates is
x* y* z*
x y z
h h h
A rational B-spline curve defined by n + 1 control points P i is given by
n
P(u) Pi Ri ,k (u), 0 u umax (2.29)
i 0
The above equation shows that R i,k(u) are a generalization of the nonrational basis
functions Ni,k(u). If we substitute hi = 1 in the equation, Ri,k(u) = Ni,k(u). The rational
basis functions Ri,k(u) have nearly all the analytic and geometric characteristics of
their nonrational B-spline counterparts.
The main difference between rational and nonrational B-spline curves is the ability
to use hi at each control point to control the behavior of the rational B-splines (or
rational curves in general).
Thus, similarly to the knot vector, one can define a homogeneous coordinate
vector H = [h0 h1 h2 h3 . . . hn]T at the control points P0, P1, . . ., Pn of the rational B-
spline curve. The choice of the H vector controls the behavior of the curve.
A rational B-spline is considered a unified representation that can define a variety
of curves and surfaces. The premise is that it can represent all wireframe, surface
and solid entities. This allows unification and conversion from one modeling
technique to another. Such an approach has some drawbacks, including the loss of
information on simple shapes.
For example, if a circular cylinder (hole) is represented by a B-spline, some data on
the specific curve type may be lost unless it is carried along. Data including the fact
that the part feature was a cylinder would be useful to manufacturing to identify it
as a hole to be drilled or bored rather than a surface to be milled.
Kinds of Surfaces
2. Ruled (lofted) Surface: This is a linear surface. It interpolates linearly between two
boundary curves that define the surface (rails). Rails can be any wireframe entity.
This entity is ideal to represent surfaces that do not have any twists or kinks. Fig.
2.23 gives some examples.
9. Offset surface: Existing surfaces can be offset to create new ones identical in shape
but may have different dimensions. It is a useful surface to use to speed up surface
construction. For example, to create a hollow cylinder, the outer or inner cylinder
can be created using a cylinder command and the other one can be created by an
offset command. Offset surface command becomes very efficient to use if the
original surface is a composite one. Figure 2.30 shows an offset surface.
It has to do with the notion of neighborhood; that is, it determines the relational
information between object entities.
The topology of the object shown in Fig. 3.2b can be stated as follows: L1 shares a
vertex (point) with L2 and C1, L2 shares a vertex with L1 and L3, L3 shares a vertex with
L2 and C1, L1 and L3 do not overlap and P1 lies outside the object. Based on these
definitions, neither geometry nor topology alone can completely model objects.
Wireframe and surface models deal only with geometrical information of objects and
are therefore considered incomplete and ambiguous. From a user point of view,
geometry is visible and topology is considered to be nongraphical relational
information that is stored in solid model databases and are not visible to users.
3. Finiteness and finite describability The former property means that the size of the
solid is not infinite while the latter ensures that a limited amount of information can
describe the solid. The latter property is needed in order to be able to store solid
models into computers whose storage space is always limited. It should be noted
that the former property does not include the latter and vice versa. For example, a
cylinder which may have a finite radius and length may be described by an infinite
number of planar faces.
4. Closure under rigid motion and regularized boolean operations This property
ensures that manipulation of solids by moving them in space or changing them via
boolean operations must produce other valid solids.
5. Boundary determinism The boundary of a solid must contain the solid and hence
must determine distinctively the interior of the solid.
Fig. 3.3
3.5 Properties of representation scheme
The formal properties of representation schemes which determine their usefulness in
geometric modeling can be stated as follows:
1. Domain: The domain of a representation scheme is the class of objects that the
scheme can represent or it is the geometric coverage of the scheme.
2. Validity The validity of a representation scheme is determined by its range, that is,
the set of valid representations or models it can produce. If a scheme produces an
invalid model, the CAD/CAM system in use may crash or the model database may be
lost or corrupted if an algorithm is invoked on the model database. Validity checks
can be achieved in three ways: test the resulting databases via a given algorithm,
build checks into the scheme generator itself, or design scheme elements (such as
primitives) that can be manipulated via a given syntax.
3. Completeness or Unambiguousness This property determines the ability of the
scheme to support analysis and other engineering applications. A complete scheme
must provide models with sufficient data for any geometric calculation to be
performed on them.
Fig. 3.4
The informal properties of representation schemes for solid models
The primary considerations for storing the model in a computer are:
i. Conciseness (i.e. how much computer memory is occupied by the model of a shape).
ii. Efficiency (i.e. how much computer time is used in creating, interrogating or
modifying the model of a shape.
In general, there is a trade-off between the usage of memory and usage of time. For
example, if we use up storage for 'remembering' the properties of a shape, then we
do not need to spend a lot of time recalculating these properties every time one
needs the information.
Representation schemes where the elements of a shape are explicitly held in the
model are termed as evaluated representations. Conversely, those where the
elements must be calculated from implicit instructions for construction of the shape
are known as unevaluated representations.
Depending on the application, either of the above approaches can be used.
Representation of solid in a computer can be divided into 6 general classes as
follows:
1. Pure Primitive Instancing
This technique is used to define numerous families of objects, each defined
parametrically as shown in Fig. 3.5. A particular solid is specified completely by giving
the family to which it belongs, together with a limited set of parameter values.
However, such systems can only define a restricted range of objects which have
been predefined in the system.
4. Cellular Decomposition
An object is represented in this scheme by a list of cells it occupies, but the cells are
not necessarily cubes, nor are they necessarily identical (see Fig. 3.8)
This is one of the most popular method of representing and building complex solids.
ACSG model is based on the principle that any physical object can be divided into a
set of bounded primitives which can be combined in a certain manner to form the
physical object.
Structuring and combining the primitives of the solid model in the graphics database,
is achieved by the use of Boolean operations. Consider two solids A and B, sharing a
common volume of space as shown in Fig. 3.10 (a). The Boolean operations that can
be performed on them and the resultant solid are shown in Fig. 3.10 (b) to (d).
Topological information provides the relationship about vertices, edges and faces
similar to that used in a wire frame model. In addition to connectivity, topological
information also includes orientation of edges and faces. Geometric information is
usually in terms of equations of the edges and the faces.
In a B-rep model, the information related to the orientation of the face is important.
Generally external vertices of the face are numbered in anti-clockwise fashion. The
normal vector of the face as determined by the right hand rule must point to the
exterior of the surface.
Consider the three faces as shown in Fig. 3.12. One of the methods to describe the
top face would be 4-3-5-6. On similar lines the other two faces could be described as
1-2-3-4 and 1-4-6-3.
7. Skinning or Lofting
This method is uses a number of two dimensional profiles for generating a three
dimensional object. The two dimensional profiles are arranged as desired and a
three dimensional space curve is made to pass through these profiles.
A skinning operation is then done for generating a solid. A typical example is shown
in Fig. 3.14. This method is useful in modeling turbine blades, aerofoil shapes,
manifolds, volute chambers and other such surfaces.
Each of the solid modeling representation discussed above has its advantages and
disadvantages. The CSG and B-rep approaches are widely used in major CAD
softwares.
In a single representation modeler, the representation is usually B-rep, with certain
commands such as sweep and a few CSG like inputs are accepted. However, the
storing of data is in B-rep format only.
As compared to this, a dual representation modeler has a primary representation
scheme as CSG. (e. g. PADL-2). Here the modeler has both B-rep and CSG
representations. However, in this case, B-rep is derived internally and the user has
no control over it.
In a truly hybrid modeler there are two independent internal representations of CSG
and B-rep. With these systems, the users have the capability to construct the
geometric model by either approach (CSG or B-rep), whichever is more appropriate
to the particular problem.
Fig. 3.16
Course Contents
4.1 Introduction
4.2 Geometric Transformations
4.3 Homogeneous Representation
4.4 Shearing
4.5 Projections of Geometric
Models
4.6 Window to View-port
transformation
Examples
4.1 Introduction
• Computer graphics can be defined as creation, storage and manipulation of pictures
and drawings by means of a computer.
• It enhances the power of communication between the computer and its users.
• It allows representation of huge set of numbers in the form of a graph or a picture
which helps in better understanding of the characteristic and pattern of data.
• A viewing surface of a raster scan display is divided into an array of pixels. A CRT
screen is made up of horizontal and vertical lines.
• Each horizontal line is made up of pixels. The memory of the computer is a collection
of bits and a bit can take any value either 0 or 1.
• Each pixel can be represented by one bit in memory. This memory is called frame
buffer.
• If a line as to be represented, then the pixel must be made bright to display the line.
• The pixel value of bit must be 1 in memory. This is known as scan conversion.
• When every entity of a geometric model remains parallel to its initial position, the
transformation is called as translation.
• Translating a model therefore implies that every point on it moves by an equal given
distance in a given direction. A translation involves moving of an element from one
location to another.
P* x*, y*
x* x dx
y* y dy
x * x dx
P * y * y dy
x dx
y dy
4.2.2 Scaling
• Scaling transformation alters the size of an object. Scaling can be uniform (i.e. equal
in both X and Y directions) or non-uniform (i.e. different in X and Y directions).
• To achieve scaling, the original coordinates would be multiplied by scaling factor.
P* x*, y* Sx x , Sy y
• This equation can also be represented in a matrix form as follow:
S 0 x
P * 0x Sy y
4.2.4 Rotation
• Rotation is an important transformation and allows the user to view the objects from
different angles.
• It can also be used to create entities arranged in circular arrays, by creating the
entity once and then rotating / copying it to the desired positions on the
circumference. This would allow the user to create an array of objects.
1 0 0
T1 0 1 0
dX dY 1
cos sin 0
T2 sin cos 0
0 0 1
1 0 0
T3 0 1 0
dX dY 1
• The required transformation matrix is given by
[T] = [T3] [T2] [T1]
1 0 0 cos sin 0 1 0 0
T 0 1 0 sin cos 0 0 1 0
dX dY 1 0 0 1 dX dY 1
1 0 0
T1 0 1 0
0 C 1
cos sin 0
T2 sin cos 0
0 0 1
1 0 0
T3 0 1 0
0 0 1
cos sin 0
T4 sin cos 0
0 0 1
1 0 0
T5 0 1 0
0 C 1
• The required transformation matrix is given by
[T] = [T5] [T4] [T3] [T2] [T1]
1 0 0 cos sin 0 1 0 0 cos sin 0 1 0 0
T 0 1 0 sin cos 0 0 1 0 sin cos 0 0 1 0
0 C 1 0 0 1 0 0 1 0 0 1 0 C 1
4.4 Shearing
• A transformation that distorts the shape of an object such that the transformed
shape appears as if the object were composed of internal layers that had been
caused to slide over each other is called a shear.
4.4.1 2D Shearing
• Two common shearing transformations are those that shift coordinate x values and
those that shift y values.
• An x-direction shear relative to the x axis is produced with the transformation matrix
1 shx 0
0 1 0 ………(4.2)
0 0 1
• which transforms coordinate positions as
x’ = x + shx . y, y’ = y ………(4.3)
• Any real number can be assigned to the shear parameter shx. A coordinate position
(x, y) is then shifted horizontally by an amount proportional to its distance (y value)
from the x axis (y = 0).
• Setting shx to 2, for example, changes the square in Fig. 4.7 into a parallelogram.
Negative values for shx shift coordinate positions to the left.
Fig. 4.7 A unit square (a) is converted to a parallelogram (b) using the x direction shear
matrix 4.2 with shx = 2.
• We can generate x-direction shears relative to other reference lines with
1 shx shx yref
0 1 0 ……..(4.4)
0 0 1
• with coordinate positions transformed as
x’ = x + shx (y – yref), y’ = y ……..(4.5)
• An example of this shearing transformation is given in Fig.4.8 for a shear parameter
value of 1 /2 relative to the line yref = –1.
Fig. 4.9 A unit square (a) is turned into a shifted parallelogram (b) with parameter values shy
= 1/2 and xref = –1 in the y direction using shearing transformation 4.6.
• This transformation shifts a coordinate position vertically by an amount proportional
to its distance from the reference line x = xref. Fig. 4.9 illustrates the conversion of a
square into a parallelogram with shy = 1/2 and xref = –1.
• Shearing operations can be expressed as sequences of basic transformations. The x-
direction shear matrix 4.2, for example, can be written as a composite
transformation involving a series of rotation and scaling matrices that would scale
the unit square of Fig. 4.9 along its diagonal, while maintaining the original lengths
and orientations of edges parallel to the x axis.
• Shifts in the positions of objects relative to shearing reference lines are equivalent to
translations.
4.4.2 3D Shearing
• In two dimensions, transformations relative to the x or y axes to produce distortions
in the shapes of objects. In three dimensions, we can also generate shears relative to
the z axis.
Fig 4.10
• As an example of three-dimensional shearing, the following transformation produces
a z-axis shear:
1 0 0 0
0 1 0 0
SHZ a b 1 0
0 0 0 1
• Parameters a and b can be assigned any real values. The effect of this transformation
matrix is to alter x- and y-coordinate values by an amount that is proportional to the
z value, while leaving the z coordinate unchanged.
• Boundaries of planes that are perpendicular to the z axis are thus shifted by an
amount proportional to z. An example of the effect of this shearing matrix on a unit
cube is shown in Fig. 4.10, for shearing values a=b=1. Shearing matrices for the x axis
and y axis are defined similarly.
• If the center is at a finite distance from the plane, perspective projection results and
all the projectors meet at the center. If, on the other hand, the center is at an infinite
distance, all the projectors become parallel (meet at infinity) and parallel projection
results. Perspective projection is usually a part of perspective, or projective,
geometry.
• Such geometry does not preserve parallelism, that is, no two lines are parallel.
Parallel projection is a part of affine geometry which is identical to Euclidean
geometry. In affine geometry, parallelism is an important concept and therefore is
preserved.
4.5.1. Perspective projection
• Perspective projection creates an artistic effect that adds some realism to
perspective views. As can be seen from Fig. 4.11(a), the size of an entity is inversely
proportional to its distance from the center of projection; that is, the closer the
entity to the center, the larger its size is.
• Perspective views are not popular among engineers and draftsmen because actual
dimensions and angles of objects and therefore shapes, cannot be preserved, which
implies that measurements cannot be taken from perspective views directly. In
addition, perspective projection does not preserve parallelism.
• In order to define perspective projection, a centre of projection and a projection
plane are required. The centre of projection is placed along the z-axis and the image
is projected onto z = 0 or xy plane.
• The transformation of perspective projection is given by:
P* = Po P
where
1 0 0 0
0 1 0 0
PO
0 0 0 0
0 0 1 / d 1
P is the given point.
P* is the reflected point.
d is the distance between the centre of projection to the projection plane.
Fig. 4.12 An object Enclosed in a Cube for Obtaining Various Parallel Projections
• Obtaining the orthographic projections is relatively straight forward because of the
parallel projections involved. The top view can be obtained by setting z = 0. The
transformation matrix will then be
1 0 0 0
0 1 0 0
TOP 0
M
0 0 0
0 0 0 1
• For obtaining the front view, y = 0 and then the resulting coordinates (x, z) will be
rotated by 900 such that the Z axis coincides with the Y axis. The transformation
matrix will then be
1 0 0 0
0 0 1 0
MFRONT 0 0 0 0
0 0 0 1
Fig. 4.14 A viewing transformation using standard rectangles for the window and viewport
Fig. 4.15 A point at position (xw, yw) in a designated window is mapped to viewport
coordinates (xv,yv) so that relative positions in the two areas are the same.
1. Perform a scaling transformation using a fixed-point position of (xwmin, ywmin) that
scales the window area to the size of the viewport.
2. Translate the scaled window area to the position of the viewport.
• Relative proportions of objects are maintained if the scaling factors are the same
(sx = sy). Otherwise, world objects will be stretched or contracted in either the x or y
direction when displayed on the output device.
• Character strings can be handled in two ways when they are mapped to a viewport.
The simplest mapping maintains a constant character size, even though the viewport
area may be enlarged or reduced relative to the window.
• This method would be employed when text is formed with standard character fonts
that cannot be changed. In systems that allow for changes in character size, string
definitions can be windowed the same as other primitives. For characters formed
with line segments, the mapping to the viewport can be carried out as a sequence of
line transformations.
• From normalized coordinates, object descriptions are mapped to the various display
devices. Any number of output devices can be open in a particular application, and
another window-to-viewport transformation can be performed for each open output
device.
• This mapping, called the workstation transformation, is accomplished by selecting a
window area in normalized space and a viewport area in the coordinates of the
display device.
• With the workstation transformation, we gain some additional control over the
positioning of a scene on individual output devices. As illustrated in Fig. 4.16, we can
use workstation transformations to partition a view so that different parts of
normalized space can be displayed on different output devices.
Fig. 4.16 Mapping selected parts of a scene in normalized coordinates to different video
monitors with workstation transformations.
Example 4.1
A triangle ABC with vertices A (32, 22), B (88, 20) and C (32, 82) is to be scaled by a factor
of 0.6 about a point X (50, 42). Determine the co-ordinates of the vertices for the scaled
triangle.
Solution:
Data given:
Sx = Sy = 0.6
Scaling about a point X (50, 42)
So, first translate the object to origin then scale the object and then translate back the
scaled object to the given point X (50, 42).
A'BC
' '
ABC T S T 1
32 22 1 1 0 0 0.6 0 0 1 0 0
A'B'C ' 88 20 1 0 1 0 0 0.6 0 0 1 0
32 82 1 50 42 1 0 0 1 50 42 1
32 22 1 1 0 0 0.6 0 0
A B C 88 20 1 0
' ' '
1 0 0 0.6 0
32 82 1 50 42 1 50 42 1
32 22 1 0.6 0 0
A'B'C ' 88 20 1 0 0.6 0
32 82 1 20 16.8 1
39.2 30 1
A B C 72.8 28.8 1
' ' '
39.2 66 1
Answer: New vertices are A’ (39.2, 30), B’ (72.8, 28.8) and C’ (39.2, 66).
Example 4.2
Using transformation matrix, determine the new co-ordinates of triangle ABC with
vertices A (0, 0), B (3, 2) and C (2, 3) after it is rotated by 45° clockwise about origin.
Solution:
Data given:
A'B'C ' 3 2 1 Sin(45 ) Cos(45 ) 0
2 3 1 0 0 1
0 0 1 0.707 0.707 0
A B C 3 2 1 0.707 0.707 0
' ' '
2 3 1 0 0 1
0 0 0
A B C 3.536 0.707 0
' ' '
3.536 0.707 1
Answer: New vertices are A’ (0, 0), B’ (3.536, -0.707) and C’ (3.536, 0.707).
Example 4.3
A rectangle ABCD has vertices A (1, 1), B (2, 1), C (2, 3) and D (1, 3). It has to be rotated by
30° counter clockwise about a point P (3, 2). Determine the new co-ordinates of the
vertices for the rectangle.
Solution:
Data given:
Rotation about a point 45° counter clockwise
Hence, θ = 45°
Rotation about a point P (3, 2), so, first translate the object to origin then rotate the object
and then translate back the rotated object to the given point P (3, 2).
A'BC D ABCD T R T 1
' ' '
1 1 1
1 0 0 Cos30 0 1 0 0
2 Sin30
1 1
A'B'C 'D' 0 1 0 Sin30 Cos30 0 0 1 0
2 3 1
3 2 1 0 0 1 3 2 1
1 3 1
1 1 1
2 1 0 0 0.866 0.5 0 1 0 0
1 1
A B C D
' ' ' '
0 1 0 0.5 0.866 0 0 1 0
2 3 1
3 2 1 0 0 1 3 2 1
1 3 1
1 1 1
2 1 0 0 0.866 0.5 0
1 1
A'B'C 'D' 0 1 0 0.5 0.866 0
2 3 1
3 2 1 3 2 1
1 3 1
1 1 1
2 0.866 0.5 0
1 1
A'B'C 'D' 0.5 0.866 0
2 3 1
1.402 1.232 1
1 3 1
1.768 0.134 1
2.634 0.634 1
A B C D
' ' ' '
1.634 2.366 1
0.768 1.866 1
Answer: New vertices are A’ (1.768, 0.134), B’ (2.634, 0.634), C’ (1.634, 2.366) and D’ (0.768,
1.866).
Example 4.4
A triangle ABC with vertices at A (0, 0), B (4, 0) and C (2, 3) is given. Perform the following
operations for it.
(i) Translation through 4 and 2 units along X and Y direction respectively,
(ii) Rotation through 90° in counter clockwise direction about the new position of
point C.
Solution:
(i) Translation by tx = 4 and ty = 2.
ABC
' ' '
ABC T
0 0 1 1 0 0
A'B'C ' 4 0 1 0 1 0
2 3 1 t x ty 1
0 0 1 1 0 0
A B C 4 0 1 0 1 0
' ' '
4 2 1
A B C 8 2 1
' ' '
6 5 1
Answer: New vertices are A’ (4, 2), B’ (8, 2) and C’ (6, 5).
(ii) Rotation about the new point C’ (6, 5) through 90° counter-clockwise.
Hence, θ = 90°
Rotation about a point C’ (6, 5), so, first translate the object to origin then rotate the
object and then translate back the rotated object to the given point C’ (6, 5).
A''B''C '' ABC
' ' '
T R T 1
4 2 1 1 0 0 Cos90 0 1 0 0
Sin90
A''B''C '' 8 2 1 0 1 0 Sin90 Cos90 0 0 1 0
6 5 1 6 5 1 0 0 1 6 5 1
4 2 1 1 0 0 0 1 0 1 0 0
A B C 8 2 1 0 1 0 1 0 0 0 1 0
'' '' ''
6 5 1
Answer: New vertices are A’’ (9, 3), B’’ (9, 7) and C’’ (6, 5).
Example 4.5
The co-ordinates of three vertices of the triangle are P (50, 20), Q (110, 20) and R (80, 60).
Determine the co-ordinates of the vertices for the new reflected triangle if it is to be
reflected about:
(i) x-axis,
(ii) Line y = x.
Solution:
(i) Reflection about x-axis
P'Q'R' PQR Mx
50 20 1 1 0 0
P Q R 110 20 1 0 1 0
' ' '
80 60 1 0 0 1
50 20 1
P Q R 110 20 1
' ' '
80 60 1
Answer: New vertices are P’ (50, -20), Q’ (110, -20) and R’ (80, -60).
(ii) Reflection about line y = x
P'Q'R' PQR M(y x )
50 20 1 0 1 0
P Q R 110 20 1 1 0 0
' ' '
80 60 1 0 0 1
20 50 1
P 'Q'R' 20 110 1
60 80 1
Answer: New vertices are P’ (20, 50), Q’ (20, 110) and R’ (60, 80).
Example 4.6
Reflect the diamond shape polygon whose vertices are A (-2, 0), B (0, -1) C (2, 0) and D (0,
1) about an arbitrary line L which is represented by equation y = 0.5 x + 1.
Solution:
Data given:
Reflect the polygon about line y = 0.5 x + 1
So, first translate the object to origin, and then rotate the object such that the line coincides
with x-axis, then reflect the polygon about x-axis, then rotate back and then translate back.
y = 0.5 x + 1
m 0.5 tan
tan1 0.5 26.565 (Clockwise)
26.565
Also, when x = 0, y = 1 and when y = 0, x = -2.
t x 2,ty 0
ABC D ABCD T R M R 1 T 1
' ' ' '
2 0 1
0 1 1 0 0 Cos Sin 0 1 0 0 Cos( ) Sin( ) 0 1 0 0
1
0 1 0 Sin Cos 0 0 1 0 Sin( ) Cos( ) 0 0 1 0
2 0 1
t ty 1 0 0 1 0 0 1 0 0 1 t x t y 1
0 1 1 x
2 0 1
1 0 0 Cos(26.565 ) Sin(26.565 ) 0 1 0 0 Cos26.565 0 1 0 0
0 1 Sin26.565
1
0 1 0 Sin(26.565 ) Cos(26.565 ) 0 0 1 0 Sin26.565 Cos26.565 0 0 1 0
2 0 1
2 0 1 0 0 1 0 0 1 0 0 1 2 0 1
0 1 1
2 0 1
0 1 1 1 0 0 0.8944 0.4472 0 1 0 0 0.8944 0.4472 0 1 0 0
0 1 0 0.4472 0.8944 0 0 1 0 0.4472 0.8944 0 0 1 0
2 0 1
2 0 1 0 0 1 0 0 1 0 0 1 2 0 1
0 1 1
2 0 1
0 1 1 1 0 0 0.8944 0.4472 0 1 0 0 0.8944 0.4472 0
0 1 0 0.4472 0.8944 0 0 1 0 0.4472 0.8944 0
2 0 1
2 0 1
0 0 1
0 0 1
2 0 1
0 1 1
2 0 1
0 1 1 1 0 0 0.8944 0.4472 0 0.8944 0.4472 0
0 1 0 0.4472 0.8944 0 0.4472 0.8944 0
2 0 1
2 0 1
0 0 1
2 0 1
0 1 1
2 0 1
0 1 1 1 0 0 0.6 0.8 0
0 1 0 0.8 0.6 0
2 0 1
2 0 1
2 0 1
0 1 1
2 0 1
0 1 1 0.6 0.8 0
0.8 0.6 0
2 0 1
0.8 1.6 1
0 1 1
2 0 1
1.6 2.2 1
0.4 3.2 1
0 1 1
Answer: New vertices are A’ (-2, 0), B’ (-1.6, 2.2), C’ (0.4, 3.2) and D’ (0, 1).
Course Contents
5.1 Basic Concept
5.2 Historical Background
5.3 Definition
5.4 Engineering Applications of
the Finite Element Method
5.5 General procedure of Finite
Element Method
5.6 Stress analysis of stepped bar
5.7 Penalty Approach
5.8 Effect of Temperature on
Elements
5.9 Discretization of the Domain
5.10 Discretization Process
5.11 Automatic Mesh Generation
5.12 Analysis of Trusses
5.13 Principle of Minimum
Potential Energy
5.14 Natural OR Intrinsic
Coordinate System
5.15 Shape function in Natural
Coordinate System
Fig. 5.3 Lower and Upper Bounds to the Circumference of a Circle.
Eigenvalue
Area of Study Equilibrium Problems Propagation Problems
Problems
1.Civil Static analysis of Natural frequencies Propagation of stress
engineering trusses, frames,folded andmodes of waves;response of
structures plates, shell roofs, structures;stability of structures toaperiodic
shearwalls, bridges, structures loads
andprestressedconcrete
structures
2. Aircraft Static analysis of Natural frequencies, Response of aircraft
structures aircraft wings, flutter, and stability structures torandom
fuselages, fins, rockets, of loads; dynamic
spacecraft, and missile aircraft, responseof aircraft and
structures rocket,spacecraft, spacecraft toaperiodic
and missilestructures loads
Step 1: Idealization.
The bar is idealized as an assemblage of two elements, one element for each step of the bar
asshown in Figure 5.4(b). Each element is assumed to have nodes at the ends so that the
stepped barwill have a total of three nodes.
Since the load is applied in the axial direction, the axialdisplacements of the three nodes are
considered as the nodal unknown degrees of freedom of thesystem, and are denoted as Φ 1,Φ2,
and Φ3 as shown in Figure 5.4(b).
Step 2: Develop interpolation or displacement model.
Since the two end displacements of element e, Φ1(e), and Φ2(e), are considered the degrees of
freedom, the axial displacement, ϕ(x), within the element e is assumed to vary linearly as
(Figure 5.4(c)): ϕ(x) = a+bx (E.1)
The element stiffness matrices can be derived from the principle of minimum potential
energy. Forthis, we write the potential energy of the bar (I) under axial deformation as
I = strain energy – work done by external forces
= (1) + (2) – Wp
where(e) represents the strain energy of element e, and Wp denotes the work done by
external forcesacting on the bar.
e1
1
2 = vector ofglobal displacements.
3
Example 5.1:A1 = 200 mm2, E1 = E2 = E = 2 x 106 N/mm2
A2 = 100 mm2, l1 = l2 = 100 mm
P3 = 1000 N. Find: Displacement and stress & strain.
In the present case, external loads act only at the node points; as such, there is no need to
assemblethe element load vectors. The overall or global load vector can be written as
Example 5.2:A thin plate as shown in Fig. 5.5(a) has uniform thickness of 2 cm and its
modulus of elasticity is 200 x 103 N/mm2 and density 7800 kg/m3. In addition to its self
weight the plate is subjected to a point load P of500 N is applied at its midpoint.
Solve the following:
(i) Finite element model with two finite elements.
(ii) Global stiffness matrix.
(iii) Global load matrix.
(iv) Displacement at nodal point.
(i) The tapered plate can be idealized as two element model with the tapered area
converted to the rectangular equivalent area Refer Fig. (b). The areas A1 and A2
are equivalent areas calculated as
15 11.25
A1 2 26.25 cm2
2
11.25 7.5
A2 2 18.75 cm2
2
(ii) Global stiffness matrix can be obtained as
(iv) The displacement at nodal point can be obtained by writing the equation in global
form as
5.7 PenaltyApproach
In the preceding problems, the elimination approach was used to achieve simplified
matrices. This method though simple, is not very easy to adapt in terms of algorithms
written fix computer programs.
An alternate method to achieve solutions is by the penalty approach. By this approach
a rigid support is considered as a spring having infinite stiffness. Consider a system as
shown in Fig. 7.6.
At node l, the stiffness term is „C‟ is introduced to reflect the boundary condition
related to a rigid support. To compensate this change, the force term will also be
modified as:
The reaction force as per penalty approach would be found by multiplying the added
stiffness with the net deflection of the node.
R = - C(Q-a)
The penalty approach is an approximate method and the accuracy of the forces
depends on the value of C.
Example 5.3:Consider the bar shown in Fig. 5.7. An axial load P = 200 x 103 N is applied as
shown.Using the penalty approach for handling boundary conditions, do the following:
(a) Determine the nodal displacements
(b) Determine the stress in each material.
(c) Determine the reaction forces.
Fig. 5.7
(a) The element stiffness matrices are
Example 5.4:In Fig. 5.8(a), a load P = 60 x 103 N is applied as shown. Determine the
displacement field,stress and support reactions in the body. Take E = 20 x 103N/mm2.
Fig. 5.8
The boundary conditions are Q1= 0 and Q3= 1.2 mm. The structural stiffness matrix K is
The solution is
Q = [7.49985 x 10-5, 1.500045, 1.200015]Tmm
The element stresses are
=–10.001 x 103N
Fig. 5.9
Consider the horizontal step bar supported at two ends is subjected to athermal stress and
load P at node 2 as shown in Fig. 5.9.
Thermal load in element 1
Example 5.5 : An axial load P = 300 x 103 N is applied at 20C to the rod as shown in Fig.
5.10.The temperatureis then raised to 60C.
Fig. 5.10
(a) The element stiffness matrices are
Now, in assembling F, both temperature and point load effects have to be considered.
The element temperature forces due to ΔT = 40C are obtained as
If the geometry, material properties, and other parameters of the body can be
described by three independent spatial coordinates, we can idealize the body by using
the three-dimensional elements shown in Fig.5.13.
5.10Discretization Process
Step - 1 :Type of Elements
If the problem involves the analysis of a truss structure under a given set of load
conditions (Fig. 5.17(a)), the type of elements to be used for idealization is obviously
the “bar or line elements” as shown in Fig. 5.17(b).
Fig. 5.17 A Truss Structure.
In the case of stress analysis of the short beam shown in Fig.5.18(a), the finite element
idealization can be done using three-dimensional solid elements as shown in Fig.
5.18(b).
In some cases, we may have to use two or more types of elements for idealization. An
example of this would be the analysis of an aircraft wing.
Since the wing consists of top and bottom covers, Stiffening webs, andflanges, three
types of elements—namely, triangular plate elements (for covers),rectangular shear
panels (for webs), and frame elements (for flanges)—have been used in the idealization
shown in Fig. 5.20.
If the body has no abrupt changes in geometry, material properties, and external
conditions (e.g., load and temperature), the body can be divided into equal
subdivisions and hence the spacing of the nodes can be uniform.
On the other hand, if there are any discontinuities in the problem, nodes have to be
introduced at these discontinuities, as shown in Fig. 5.23.
Step - 4 :Number of Elements
The number of elements to be chosen for idealization is related to the accuracy
desired, size of elements, and the number of dof involved.
Although an increase in the number of elements generally means more accurate
results, for any given problem, there will be a certain number of elements beyond
which the accuracy cannot be significantly improved. This behavior is shown
graphically in Fig. 5.24.
Moreover, since the use of a large number of elements involves a large number of dof,
we may not be able to store the resulting matrices in the available computer memory.
(a) Plate with hole (b) Only half of platecan be considered foranalysis
Fig. 5.25A Plate with a Hole withSymmetric Geometryand Loading.
Step - 6 :Finite Representation of Infinite Bodies
In most of the problems, like in the analysis of beams, plates, and shells, the
boundaries of the body or continuum are clearly defined. Hence, the entire body can
be considered for element idealization.
However, in some cases, as in the analysis of dams, foundations, and semi-infinite
bodies, the boundaries are not clearly defined. In the case of dams (Figure 5.26), since
the geometry is uniform and the loading does not change in the length direction, a unit
slice of the dam can be considered for idealization and analyzed as a plane strain
problem.
However, in the case of the foundation problem shown in Fig. 5.27(a), we cannot
idealize the complete semi-infinite soil by finite elements. Fortunately, it is not really
necessary to idealize the infinite body.
Since the effect of loading decreases gradually with increasing distance from the point
of loading, we can consider only that much of the continuum in which the loading is
expected to have a significant effect as shown in Fig. 5.27(b). Once the significant
extent of the infinite body is identified as shown in Fig. 5.27(b), the boundary
conditions for this finite body have to be incorporated in the solution.
Automatic mesh generation involves the subdivision of a given domain, which may
be in the form of a curve, surface, or solid (described by a CAD or solid modeling
package) into a set of nodes (or vertices) and elements (subdomains) to represent the
domain as closely as possible subject to the specified element shape and size
restrictions.
Many automatic mesh generation schemes use a “bottom-up” approach in that nodes
(or vertices or corners of the domain) are meshed first, followed by curves
(boundaries), then surfaces, and finally solids.
Thus, for a given geometric domain of the problem, nodes are first placed at the
corner points of the domain, and then nodes are distributed along the geometric curves
that define the boundaries.
Next, the boundary nodes are used to develop nodes in the surface(s), and finally the
nodes on the various surfaces are used to develop nodes within the given volume (or
domain).
The nodes or mesh points are used to define line elements if the domain is one-
dimensional, triangular, or quadrilateral elements if the domain is two-dimensional,
and tetrahedral or hexahedral elements if the domain is three-dimensional.
The automatic mesh generation schemes are usually tied to solid modeling and
computer aided design schemes. When the user supplies information on the surfaces
and volumes of the material domains that make up the object or system, an automatic
mesh generator generates the nodes and elements in the object.
The user can also specify minimum permissible element sizes for different regions of
the object. Many mesh generation schemes first create all the nodes and then produce
a mesh of triangles by connecting the nodes to form triangles (in a plane region).
In a particular scheme, known as Delaunay triangulation, the triangular elements are
generated by maximizing the sum of the smallest angles of the triangles; thus the
procedure avoids generation of thin elements.
5.12Analysis of Trusses
The links of a truss are two-force members, where the direction of loading is along the
axis of the member. Every truss element is in direct tension or compression.
All loads and reactions are applied only at the joints and all members are connected
together at their ends by frictionless pin joints. This makes the truss members very
similar to a 1D spar element.
le ( x2 x1 )2 ( y2 y1 )2
q1‟ =qll + q2 m
q2‟ = q3 l + q4 m
Fig. 5.29 Direction Cosines
l2 lm lm
l 2
A E lm m2 lm m 2
[K ] e e 2
Le l lm l2 lm
2
lm m lm m2
Ee
l m l m q
le
Thermal Effect In Truss Member
l
m
(1) Thermal Load , P = Ae Ee e
l
m
Ee
(2) Stress for an element, l m l m q Ee t
le
(3) Remaining steps will be same as earlier.
Example 5.6: A two member truss is as shown in Fig. 5.30. The cross-sectional area ofeach
member is 200 mm2 and the modulus of elasticity is 200 GPa. Determine the
deflections,reactions and stresses in each of the members.
Fig. 5.30
In globalterms, each node would have2 dof. These dof are marked as shown in Fig.5.31.
Theposition of the nodes, with respect to origin (considered at node l) are as tabulated below:
Node Xi Yi
1 0 0
2 4000 0
3 0 3000
Fig.5.31
For all elements, A=200 mm2
and E= 200 x 103 N/mm2
The element connectivity table with the relevant terms are:
Ae Ee x j xi y j yi
Element Ni Nj le ( x j xi )2 ( y j yi )2 l m l2 m2 lm
le le le
4000 0
(4000 0) 2 (0 0) 2 00
(1) 1 2 10000 4000 0 1 0 0
4000 4000
1
4000
(0 4000) 2 (3000 0) 2 3000
(2) 2 3 8000 5000 0.6 0.64 0.36 -0.48
5000 5000
0.8
As each node has two dof in global form, for every element, the element stiffness matrix
would be in a 4 x 4 form. For element 1 defined by nodes l-2,the dof are Q1, Q2, Q3 andQ4
and that for element 2 defined by nodes 2-3, would be Q3, Q4, Q5 andQ6. For a truss element
l2 lm l 2lm
A E lm m2 lm m 2
[ K ]e e e 2
Le l lm l2 lm
2
lm m lm m2
In this case, node 1 and node 3 are completely fixed and hence,
Q1=Q2=Q5 = Q6 = 0
Hence, rows and columns 1,2,5 and 6 can be eliminated
Also the external nodal forces,
F1 = F2 = F3 = F5 = F6 = 0
F4 = -10 x 103 N
Element 2:
Example 5.7:Consider the four-bar truss shown in Fig. 5.32(a). It is given that E = 29.5 x 106
psi andAe = lin.2 for all elements. Complete the following:
(a) Determine the element stiffness matrix for each element.
(b) Assemble the structural stiffness matrix K for the entire truss
(c) Using the elimination approach, solve for the nodal displacement.
(d) Recover the stresses in each element.
(e) Calculate the reaction forces.
(a)
(b)
Fig. 5.32
(a) It is recommended that a tabular form be used for representing nodal coordinate data
and element information. The nodal coordinate data are as follows:
Node x y
1 0 0
2 40 0
3 40 30
4 0 30
Element 1 2
1 1 2
2 3 2
3 1 3
4 4 3
Note that the user has a choice in defining element connectivity. For example, the
connectivityof element 2 can be defined as 2-3 instead of 3-2 as in the previous table.
However,calculations of the direction cosines will be consistent with the adopted
connectivityscheme. Using formulas,together with the nodal coordinate data andthe given
element connectivity information, we obtain the direction cosines table:
Element le l m
1 40 1 0
2 30 0 -1
3 50 0.8 0.6
4 40 1 0
For example, the direction cosines of elements 3 are obtained as
l = (x3 – x1)le = (40 - 0)/50 = 0.8 and m = (y3 – y1)le = (30 - 0)/50 = 0.6.
Now, the element stiffness matrices for element 1 can be written as
The global dofs associated with element 1, which is connected between nodes 1 and2,are
indicated in k1 earlier.These global dofs are shown in Fig. 5.32(a) and assistin assembling the
various element stiffness matrices.The element stiffness matrices of elements 2,3and 4 are as
follows:
(b) The structural stiffness matrix K is now assembled from the element stiffness
matrices.By adding the element stiffness contributions, noting the element
connectivity, we get
(c) The structural stiffness matrix K given above needs to be modified to account for the
boundary conditions. The elimination approach will be used here. The rows and
columns corresponding to dofs 1, 2, 4, 7, and 8, which correspond to fixed supports,
are deleted from the K matrix. The reduced finite element equations are given as
The nodal displacement vector for the entire structure can therefore be written as
Q =[0, 0,27.12x 10-3, 0,5.65 x 10-3, -22.25 x 10-3,0, 0]T in.
(d) The stress in each element can now be determined as shown below.
The connectivity of element 1 is 1 - 2. Consequently, the
nodaldisplacementvectorforelementlisgivenby q = [0,0, 27.72 x 10-3,0]T
Which results in
Fig. 5.33
Consider,a system of four spring having the nodes at point 1, 2, 3.
The potential energy P of the system is
1 1 1 1
P k112 k2 2 2 k3 32 k4 4 2 F1 x1 F3 x3
2 2 2 2
Where,
δ1, δ2, δ3, δ4 = deflections of the four springs
x1, x2, x3 = displacement at nodal points 1, 2, 3
F1, F3 = forces at nodal points 1 and 3
k1, k2, k3, k4 = stiffnesses of four springs
δ1 = x1– x2
δ2 = x2
δ3 = x3– x2
δ4 = – x3
Potential energy of the system (P) is given by
1 1 1 1
P k1 ( x1 x2 )2 k2 x2 2 k3 ( x3 x2 )2 k4 x32 F1 x1 F3 x3
2 2 2 2
For equilibrium of this three degrees of freedom system, we need to minimize (P) with
respect to x1, x2 and x3.
According to principle of minimum potential energy, the potential energy is differentiated
with respect to each displacement and equated to zero for minimum condition of potential
energy.
…….(4)
The x1, x2, x3deflectionscanbeobtainedbyusing numerical methods.
On the other hand, we proceed to write the equilibrium equations of the system by
considering the equilibrium of each separate node as shown in Fig. 5.34.
k1δ1 = F1
k2δ2 – k1δ1 – k3δ3 = 0
k3δ3 – k4δ4 = F3
which is precisely the set of equations represented in Eq. (4).
Fig. 5.34.
We see clearly that the set of equations (4) is obtained in a routine manner using thepotential
energy approach,without any reference to the free-body diagrams. This makes thepotential
energy approach attractive for large and complex problems.
Example 5.8: Calculate the deflections of the points at node 1, 2 and 3 for the spring system
shown in Fig. 5.33. The stiffnesses are k1 = 80 N/mm, k2= 50 N/mm, k3=60 N/mm, k4 = 40
N/mm, the loads are F1= 40 N, F3 = 60 N.
Find the deflections x1, x2 and x3.
The model of the above system is used and stiffness, deflection and load matrix can be
written as
Solving the above matrices, the value of x1= 0.4 mm, x2= 0.1 mm, x3= 0.66 mm.
Example 5.9: Fig. 5.35 shows a cluster of four springs. One end of the assembly is fixed and
a force of 1000 N is applied at the end. Using the finite element method, determine:
(a) The deflection of each spring.
(b) The reaction forces at support.
Fig. 5.35
The system of springs can be represented by a finite element model as shown in Fig. 5.36
Fig. 5.36
The element connectivity table is as shown:
In global terms,
By elimination approach:
22 Q2 – 10 Q3 = 0
Q2 = 0.4545 Q3
– 10 Q2 + 30 Q3 = 1000
– 10 (0.4545 Q3) + 30 Q3 = 1000
Q3 = 39.286 mm
Q2 = 0.4545 x 39.286 = 17.857 mm
To determine the reaction forces,
R = KQ – F
Fig.5.37
Consider a element (e), having node numbers 1 & 2 shown in Fig. 5.37 (a). The first node
1 would be at a distance x1 and second node would be at a distance x2 from the reference.
A convenient coordinate system called as the natural coordinate system is defined, as it
helps in formulating individual element matrix which can than be used to combine and
form a global stiffness matrix.
In natural coordinate system, the centre of the element is considered as 0 and the node 1
and node 2 are placed at a distance - 1 and + 1 respectively Fig. 5.37(b). The variable of
measurement of the distance in this case is represented as ξ. Thus node 1 is at coordinate
position ξ = - 1 and node 2 is at ξ = + 1. Total length of the element would thus be 2 units
and this length of the element is covered in the range ξ = - 1 to +1.
To establish relationship between two coordinate system consider any point P situated at a
distance x, in the Global coordinate system Fig.5.37 (a) and correspondingly at a distance
ξ from the origin as shown in Fig.5.37 (b).
Now
Length of element in Natural system Dist. of Point P from Node 1 in Natural system
Length of element in Global system Dist. of Point P from Node 1 in Global system
2 1
x 2 x1 x x1
2 x x1
1 _______(a)
x 2 x1
Confirm the validity of equation (a)
2 x1 x1
At x = x1 ξ = 1 = 0 1 = 1
x 2 x1
2 x 2 x1
At x x 2 1 2 1 1
x 2 x1
This confirm the relation of the two coordinate system.
5.15 Shape function in Natural Coordinate System:
The natural coordinate can be used to define shape functions. This makes it convenient to
isolate the element from the continuum and develop the necessary element stiffness
matrix. The shape function as defined earlier is used to interpolate the deflections or
degree of freedom within the element. The accuracy of calculations would increase with
increase in number of elements. Consider linear distribution as represented by Fig.5.38.
Fig.5.38
The shape function N1 and N2 in natural coordinate term can be developed by considering
Fig.5.39 (a) and Fig.5.39 (b).
Fig.5.39
1
m slope
y mx C 2
For N 1 1 , 1
1
N1 C
2
1 1
1 (1) C C
2 2
1 1
N1
2 2
1
N1
2
1
m slope
y mx C 2
For N2 0 , 1
1
N2 C
2
1
0 (1) C
2
1
C
2
1 1
N2
2 2
1
N2
2
Once the shape functions are defined, the linear displacement field within the element can
be written in terms of nodal displacements q1 and q2 as….
u N1 q1 N2 q 2 ........ (b)
Fig.5.40
u Nq
where N N1 , N 2
q1
q q1 , q 2 T
q 2
The term q is referred to as element displacement vector, and the verification of equation
(b) can be done by considering the equation of shape functions.
At Node 1: 1
1 1 (1)
N1 1
2 2
1 1 (1)
N2 0
2 2
u N1 q1 N 2 q 2
1 (q1 ) 0 (q 2 )
q1
At Node 2: 1
1 11
N1 0
2 2
1 11
N2 1
2 2
So displacement at Node 2 will be
u N 2 q 2 N1 q1
1 (q 2 ) 0 (q1 )
q2
Thus it is seen that as per equation, the displacement at Node 1 and 2 are q1 and q2 which
are the expected results.
2 x x1
We know equation 1
x 2 x1
1 x x1
2 x 2 x1
1
x x 2 x1 x1
2
1 1
x2 x1 x1
2 2
1 1
x x2 1 x1
2 2
1 1 1 1
x2 x1 N2 , N1
2 2 2 2
x N1 x1 N 2 x 2
x N1 x1 N 2 x 2
u N1 q1 N 2 q 2
Comparing equation, it is seen that both, the displacement u and the coordinate x can be
interpolated within the element using the same shape function N1 and N2. This is referred
to as the “ Isoparametric Formulation”.
Example – 5.10: Temp. at Node 1 is 100° C and Node 2 is 40° C. The length of the element
is 200 mm. Evaluate the shape function associated with Node 1 and Node 2. Calculate the
temp. at point P situated at 150 mm from Node 1. Assume a linear shape function.
Fig. 5.41
Solution:
At Node 1:
x1 0
x 2 200 mm
x 0
2 x x1
1 1
x 2 x1
1
N1 1
2
1
N2 0
2
At Node 2:
x1 0
x 2 200 mm
x 200 mm
2 x x1 2 200 0
1 1 1
x 2 x1 200 0
1
N1 0
2
1
N2 1
2
At Point P:
x1 0 t1 100 C
x 2 200 mm t 2 40 C
x 150 mm
2 x x1 2 150 0
1 1 0.5
x 2 x1 200 0
1 1 0.5
N1 0.25
2 2
1 1 0.5
N2 0.75
2 2
t N1 t1 N 2 t 2
0.25 100 0.75 40
t 55 C
Example – 5.11 : A 1D spar element having a linear shape function as shown in fig. If the
temp.at Node 1 is 50° C and Node 2 is -20°C. Find the temp. at point P.
Fig. 5.42
Solution:
At Point P:
x1 25 t1 50 C
x 2 50 t 2 20 C
x 30
Let
2 x x1 2 30 25
1 1 0.6
x 2 x1 50 25
Now
1 1 0.6
N1 0.8
2 2
1 1 0.6
N2 0.2
2 2
t N1 t1 N 2 t 2
0.8 50 0.2 20
t 30 C
Example – 5.12: Consider an element having a linear shape function shown in fig. Evaluate
the natural coordinate and shape functions for point P. If the displacement at Node 1 and
Node 2 are 2 mm and -1 mm respectively, determine the value of displacement at point P.
Also determine in global terms the point where the displacement would be zero. Also
determine the shape function at zero displacement point.
Fig. 5.43
Solution:
At point P:
x1 180 mm q1 2 mm
x 2 360 mm q 2 1 mm
x 220 mm
Let
2 x x1 2 220 180
1 1 0.556
x 2 x1 360 180
1 1 0.556
N1 0.778
2 2
1 1 0.556
N2 0.222
2 2
Let
u N1 q1 N 2 q 2
0.778 2 0.222 1
u 1.334 mm
Let
u N1 q1 N 2 q 2
0 N1 2 N 2 1
2 N1 N 2
1 1
2
2 2
2 2 1
1
0.333
3
Let
2 x x1
1
x 2 x1
2 x 180
0.333 1
360 180
x 300 mm
1 1 0.333
N1 0.333
2 2
N 2 2 N1 2 (0.333) 0.667
Fig. 5.44
Solution:
x i 10
x j 60
1
x 40
2
i 120 C
j 80 C
Let
2 x x1
1
x 2 x1
2 40 10
1
60 10
0.2
1 1 0.2
N1 0.4
2 2
1 1 0.2
N2 0.6
2 2
Let
N1 i N 2 j
0.4 120 0.6 80
96 C
References:
Finite Element Method – S.S. Rao
Introduction to Finite Elements in Engineering - Tirupathi R. Chandrupatla
CAD/CAM & Automation – FarazdakHaideri
CAD/CAM – Khandare