CAD/CAM Course Overview and Objectives
CAD/CAM Course Overview and Objectives
SYLLABUS
UNIT I COMPUTER AIDED DESIGN 9 Hours
Product cycle- Design process- sequential and concurrent engineering- Computer aided design – CAD system
ME23004 – CAD/CAM
architecture- Computer graphics – co-ordinate systems- 2D and 3D transformations- homogeneous coordinates-
Line drawing -Clipping- viewing transformation-visual realism.
UNIT II GEOMETRIC MODELLING 9 Hours
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 – Introduction to model storage –Data structures for interactive modeling- integration of design
analysis and CAD- customization and design automation.
UNIT III CAD STANDARDS and CAD CAM INTERFACE 9 Hours
Graphics and computing standards- Data exchange standards- IGES-STEP – communication standards- current
UNIT I trends in manufacturing engineering- Group technology- design for manufacture and assembly – process
planning techniques – Total approach to product development – techniques of quality engineering – QFD and
FMEA – Taguchi methods –Additive Manufacturing.
COMPUTER AIDED DESIGN UNIT IV COMPUTER NUMERICAL CONTROL
Fundamentals of Numerical control – CNC technology – CNC hardware basics- CNC Tooling and machine
9 Hours
tools- Control systems – CNC Programming – Manual programming – Machining and Turning Centre
Programming - Computer assisted part programming – APT language structure and commands.
UNIT V INFORMATION AND INTEGRATION OF MANUFACTURING SYSTEMS 9 Hours
Information Requirements of Manufacturing - Group Technology and Computer Aided Process Planning-
production planning and control- Integration of Manufacturing Systems: Communications - Material-Handling
Lecture by Systems- Flexible Manufacturing Systems - Computer Aided Quality Control - introduction to Computer
Dr. [Link], M.E., Ph.D. Integrated Manufacturing- Future of CAD/CAM
Assistant Professor/ Mechanical,
TEXT BOOKS:
Anna University, Chennai 1. Groover, M. P., CAD/CAM: Computer-Aided Design and Manufacturing, Pearson Education, 2008.
2
1
8/3/2025
5 6
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
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.
8
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
2
8/3/2025
11 12
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
3
8/3/2025
13 14
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
15 16
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
4
8/3/2025
20
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
5
8/3/2025
3. Data
6
8/3/2025
• Sometimes, it may also be called the model • However, sometimes it becomes difficult to define
coordinate system. certain geometries if they are to be defined from the
WCS.
• Figure shows the component with its associated
world coordinate system, X, Y and Z. This is • In such cases, alternate coordinate systems can be
basically the coordinate system in which the part defined relative to the WCS. These coordinate
database is stored. systems are termed User Coordinate Systems
(UCS) or working coordinate systems.
• However, the user will also have the flexibility of
inputting the data in other coordinate systems as • For example, in Fig. X’, Y’, Z’ is the user coordinate
well such as polar coordinates or spherical system defined for modelling the slot. Similarly,
coordinates. there can be other UCS that could be defined
depending upon the geometry.
• The software before it stores the data will actually
convert this information into the Cartesian • This reduces the modelling complexity. The UCS
system. can be defined by shifting the origin only as shown
in Fig. or by combining the origin with the
orientation of the axes as well.
27 28
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
7
8/3/2025
29 30
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
2D TRANSFORMATIONS 2D TRANSFORMATIONS
1. Translation 1. Translation
• 2D Translation is a process of moving an object from one • Given a circle C with radius 10 and center coordinates (1, 4). Apply the translation with
position to another in a two dimensional plane. distance 5 in the direction of X axis and 1 in the direction of Y axis. Obtain the new
• Consider a point object O has to be moved from one position to coordinates of C without changing its radius.
another in a 2D plane.
Let- Solution-
• Initial coordinates of the object O = (Xold, Yold) Given-
• New coordinates of the object O after translation = (Xnew, Ynew) •Old center coordinates of C = (Xold, Yold) = (1, 4)
• Translation vector or Shift vector = (Tx, Ty) •Translation vector = (Tx, Ty) = (5, 1)
•Let the new center coordinates of C = (Xnew, Ynew).
Given a Translation vector (Tx, Ty)-
• Tx defines the distance the Xold coordinate has to be moved. •Applying the translation equations, we have-
• Ty defines the distance the Yold coordinate has to be moved. Xnew = Xold + Tx = 1 + 5 = 6
• This translation is achieved by adding the translation Ynew = Yold + Ty = 4 + 1 = 5
coordinates to the old coordinates of the object as-
•Thus, New center coordinates of C = (6, 5).
Xnew = Xold + Tx (This denotes translation towards X axis)
Ynew = Yold + Ty (This denotes translation towards Y axis)
8
8/3/2025
2. Rotation 2. Rotation
• 2D Rotation is a process of rotating an object with respect to an angle in a two
dimensional plane. Problem:
• Consider a point object O has to be rotated from one angle to another in a 2D plane. Given a line segment with starting point as (0, 0) and ending point as (4, 4). Apply
Let- 30 degree rotation anticlockwise direction on the line segment and find out the new
• Initial coordinates of the object O = (Xold, Yold) coordinates of the line.
• Initial angle of the object O with respect to origin = Φ
• Rotation angle = θ Solution
• New coordinates of the object O after rotation = (Xnew, Ynew) We rotate a straight line by its end points with the same angle. Then, we re-draw a
Xold = rcosϕ.................................................(1) line between the new end points.
Yold = rsinϕ..................................................(2)
• Same way we can represent the point O’ (Xnew, Ynew) as −
Given
Xnew = rcos(ϕ+θ) = rcosϕcosθ−rsinϕsinθ.......(3)
Old ending coordinates of the line = (Xold, Yold) = (4, 4)
Ynew = rsin(ϕ+θ) = rcosϕsinθ+rsinϕcosθ.......(4)
Rotation angle = θ = 30º
• This rotation is achieved by using the following rotation equations-
Xnew = Xold . cosθ – Yold . sinθ
Ynew = Xold . sinθ + Yold . cosθ Let new ending coordinates of the line after rotation = (Xnew, Ynew).
• In Matrix form, the above rotation equations may be represented as-
33 34
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
2. Rotation 3. Scaling
Applying the rotation equations, we have- • Scaling may be used to increase or reduce the size of object.
Xnew = Xold x cosθ – Yold x sinθ • Scaling subjects the coordinate points of the original object to change.
= 4 x cos30º – 4 x sin30º • Scaling factor determines whether the object size is to be increased or reduced.
= 4 x (√3 / 2) – 4 x (1 / 2) If scaling factor > 1, then the object size is increased.
= 2√3 – 2 If scaling factor < 1, then the object size is reduced.
= 2(√3 – 1)
= 2(1.73 – 1) Consider a point object O has to be scaled in a 2D plane.
= 1.46 Let-
• Initial coordinates of the object O = (Xold, Yold)
• Scaling factor for X-axis = Sx
Ynew = Xold x sinθ + Yold x cosθ
• Scaling factor for Y-axis = Sy
= 4 x sin30º + 4 x cos30º • New coordinates of the object O after scaling = (Xnew, Ynew)
= 4 x (1 / 2) + 4 x (√3 / 2) • This scaling is achieved by using the following
= 2 + 2√3 scaling equations-
= 2(1 + √3) Xnew = Xold . Sx
= 2(1 + 1.73) Ynew = Yold . Sy
= 5.46 In Matrix form, the above scaling equations may be represented as-
Thus, New ending coordinates of the line after rotation = (1.46, 5.46).
35 36
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
9
8/3/2025
3. Scaling 3. Scaling
Problem For Coordinates B(3, 3)
Given a square object with coordinate points A(0, 3), B(3, 3), C(3, 0), D(0, 0).
Apply the scaling parameter 2 towards X axis and 3 towards Y axis and obtain the Let the new coordinates of corner B after scaling = (Xnew, Ynew).
new coordinates of the object.
Applying the scaling equations, we have-
Solution Xnew = Xold . Sx = 3 x 2 = 6
Given Ynew = Yold . Sy = 3 x 3 = 9
Old corner coordinates of the square = A (0, 3), B(3, 3), C(3, 0), D(0, 0)
Scaling factor along X axis = 2 Thus, New coordinates of corner B after scaling = (6, 9).
Scaling factor along Y axis = 3
For Coordinates C(3, 0)
For Coordinates A(0, 3)
Let the new coordinates of corner C after scaling = (Xnew, Ynew).
Let the new coordinates of corner A after scaling = (Xnew, Ynew).
Applying the scaling equations, we have-
Applying the scaling equations, we have- Xnew = Xold . Sx = 3 x 2 = 6
Xnew = Xold . Sx = 0 x 2 = 0 Ynew = Yold . Sy = 0 x 3 = 0
Ynew = Yold . Sy = 3 x 3 = 9
Thus, New coordinates of corner C after scaling = (6, 0).
Thus, New coordinates of corner A after scaling = (0, 9). 37 38
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
3. Scaling 4. Reflection
For Coordinates D(0, 0) • Reflection is a kind of rotation where the angle of rotation is 180 degree.
• The reflected object is always formed on the other side of mirror.
Let the new coordinates of corner D after scaling = (Xnew, Ynew). • The size of reflected object is same as the size of original object.
Applying the scaling equations, we have- Consider a point object O has to be reflected in a 2D plane. Let-
Xnew = Xold . Sx = 0 x 2 = 0 • Initial coordinates of the object O = (Xold, Yold)
Ynew = Yold . Sy = 0 x 3 = 0 • New coordinates of the reflected object O after reflection = (Xnew, Ynew)
Thus, New coordinates of corner D after scaling = (0, 0). Reflection On X-Axis:
This reflection is achieved by using the following reflection equations-
Xnew = Xold
Thus, New coordinates of the square after scaling = A (0, 9), B(6, 9), C(6, 0), D(0, 0).
Ynew = -Yold
In Matrix form, the above reflection equations may be represented as-
39 40
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
10
8/3/2025
4. Reflection 4. Reflection
Reflection On Y-Axis: Problem
Given a triangle with coordinate points A(3, 4), B(6, 4), C(5, 6). Apply the
This reflection is achieved by using the following reflection equations- reflection on the X axis and obtain the new coordinates of the object.
Xnew = -Xold
Ynew = Yold Solution-
Given-
In Matrix form, the above reflection equations may be represented as- •Old corner coordinates of the triangle = A (3, 4), B(6, 4), C(5, 6)
•Reflection has to be taken on the X axis
41 42
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
4. Reflection 5. Shear
For Coordinates B(6, 4)
• 2D Shearing is an ideal technique to change the shape of an existing object in a
Let the new coordinates of corner B after reflection = (Xnew,
two dimensional plane.
Ynew).
Applying the reflection equations, we have- • In a two dimensional plane, the object size can be changed along X direction as
Xnew = Xold = 6 well as Y direction.
Ynew = -Yold = -4 • So, there are two versions of shearing-
1. Shearing in X direction
Thus, New coordinates of corner B after reflection = (6, -4). 2. Shearing in Y direction
43 44
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
11
8/3/2025
5. Shear 5. Shear
Shearing in X Axis
• A transformation that slants the shape of an object is called the shear
transformation. The X-Shear preserves the Y coordinate and changes are made to X
• There are two shear transformations X-Shear and Y-Shear. coordinates, which causes the vertical lines to tilt right or left.
• One shifts X coordinates values and other shifts Y coordinate values. However; Xnew = Xold + Shx . Yold
in both the cases only one coordinate changes its coordinates and other Ynew = Yold
preserves its values. Shearing is also termed as Skewing. In Matrix form, the above shearing equations may be represented as-
45 46
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
5. Shear 5. Shear
Shearing in Y Axis Shearing in XY Axis
The Y-Shear preserves the X coordinates and changes the Y coordinates which The Y-Shear preserves the X coordinates and changes the Y coordinates which
causes the horizontal lines to transform into lines which slopes up or down. causes the horizontal lines to transform into lines which slopes up or down.
Xnew = Xold Xnew = Xold + Shx . Yold
Ynew = Yold + Shy . Xold Ynew = Yold + Shy . Xold
In Matrix form, the above shearing equations may be represented as- In Matrix form, the above shearing equations may be represented as-
47 48
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
12
8/3/2025
5. Shear 5. Shear
Problem For Coordinates B(0, 0)
Given a triangle with points (1, 1), (0, 0) and (1, 0). Apply shear parameter 2 on X Let the new coordinates of corner B after shearing = (Xnew, Ynew).
axis and 2 on Y axis and find out the new coordinates of the object.
Applying the shearing equations, we have-
Solution- Xnew = Xold + Shx . Yold = 0 + 2 x 0 = 0
Given- Ynew = Yold = 0
Old corner coordinates of the triangle = A (1, 1), B(0, 0), C(1, 0)
•Shearing parameter towards X direction (Shx) = 2 Thus, New coordinates of corner B after shearing = (0, 0).
•Shearing parameter towards Y direction (Shy) = 2
For Coordinates C(1, 0)
Shearing in X Axis- Let the new coordinates of corner C after shearing = (Xnew, Ynew).
5. Shear 5. Shear
Shearing in Y Axis- • For Coordinates C(1, 0)
• Let the new coordinates of corner C after
For Coordinates A(1, 1) shearing = (Xnew, Ynew).
Let the new coordinates of corner A after shearing = (Xnew, Ynew).
• Applying the shearing equations, we
Applying the shearing equations, we have- have-
Xnew = Xold = 1 • Xnew = Xold = 1
Ynew = Yold + Shy . Xold = 1 + 2 x 1 = 3 • Ynew = Yold + Shy . Xold = 0 + 2 x 1 = 2
Thus, New coordinates of corner A after shearing = (1, 3). • Thus, New coordinates of corner C after
shearing = (1, 2).
For Coordinates B(0, 0) • Thus, New coordinates of the triangle
Let the new coordinates of corner B after shearing = (Xnew, Ynew). after shearing in Y axis = A (1, 3), B(0,
0), C(1, 2).
Applying the shearing equations, we have-
Xnew = Xold = 0
Ynew = Yold + Shy . Xold = 0 + 2 x 0 = 0
13
8/3/2025
53 54
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
For homogeneous coordinates, the above rotation For homogeneous coordinates, the above
matrix may be represented as a 3 x 3 matrix as- scaling matrix may be represented as a 3 x 3
matrix as-
55 56
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
14
8/3/2025
This reflection is achieved by using the This reflection is achieved by using the
following reflection equations- following reflection equations-
Xnew = Xold Xnew = -Xold
Ynew = -Yold Ynew = Yold
In Matrix form, the above reflection In Matrix form, the above reflection
equations may be represented as- equations may be represented as-
For homogeneous coordinates, the above scaling For homogeneous coordinates, the above scaling
matrix may be represented as a 3 x 3 matrix as- matrix may be represented as a 3 x 3 matrix as-
57 58
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
Shearing in X axis is achieved by using the Shearing in Y axis is achieved by using the
following shearing equations- following shearing equations-
Xnew = Xold + Shx . Yold Xnew = Xold
Ynew = Yold Ynew = Yold + Shy . Xold
In Matrix form, the above shearing In Matrix form, the above shearing
equations may be represented as- equations may be represented as-
59 60
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
15
8/3/2025
3D TRANSFORMATIONS 1. 3D Translation
3D Translation is a process of moving an object from one position to another in a
• When the transformation takes place on a 3D plane, it is called 3D
three dimensional plane
transformation.
• The translation, scaling and rotation transformations used for 2D can be This translation is achieved by adding the
extended to three dimensions. translation coordinates to the old coordinates of
the object as-
• In 3D, each transformation is represented by a 4x4 matrix. •Xnew = Xold + Tx (This denotes translation
• Using homogeneous coordinates it is possible to represent each type of towards X axis)
transformation in a matrix form and integrate transformations into one matrix. •Ynew = Yold + Ty (This denotes translation
towards Y axis)
• To apply transformations, simply multiply matrices, also easier in hardware •Znew = Zold + Tz (This denotes translation
and software implementation. towards Z axis)
• Homogeneous coordinates can represent directions.
• Homogeneous coordinates: 4 components
• Transformation matrices: 4×4 elements
61 62
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY 62
2. 3D Rotation 3. 3D Scaling
3D Rotation is a process of rotating an object with respect to an angle in a three
dimensional plane. 3D Scaling is a process of modifying or altering the size of objects.
16
8/3/2025
4. 3D Reflection 5. 3D Shearing
3D Reflection is a kind of rotation at 180 degree. The reflected object is formed on the other side of 3D Shearing is an ideal technique to change the shape of an existing object in a three
mirror. The size of reflected object is same size.
dimensional plane.
Reflection Relative to XY Plane:
This reflection is achieved by using the Shearing in X Axis-
following reflection equations- Shearing in X axis is achieved by using the following
Xnew = Xold shearing equations-
Ynew = Yold Xnew = Xold
Znew = -Zold Ynew = Yold + Shy . Xold
Znew = Zold + Shz . Xold
Reflection Relative to YZ Plane:
This reflection is achieved by using the Shearing in Y Axis-
following reflection equations- Shearing in Y axis is achieved by using the following
Xnew = -Xold shearing equations-
Ynew = Yold Xnew = Xold + Shx . Yold
Znew = Zold Ynew = Yold
Znew = Zold + Shz . Yold
Reflection Relative to XZ Plane:
This reflection is achieved by using the Shearing in Z Axis-
following reflection equations- Shearing in Z axis is achieved by using the following
Xnew = Xold shearing equations-
Ynew = -Yold Xnew = Xold + Shx . Zold
Znew = Zold Ynew = Yold + Shy . Zold
65 Znew = Zold 66
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY 65 Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY 66
67 68
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
17
8/3/2025
69 70
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
18
8/3/2025
73 74
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
19
8/3/2025
79 80
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
20
8/3/2025
81 82
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
CLIPPING CLIPPING
Types of Clipping,
1. Point Clipping
2. Line Clipping
3. Polygon/Area Clipping
4. Text Clipping
83 84
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
21
8/3/2025
85 86
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
22
8/3/2025
Example 1:
How can determine the code for each endpoint?
To find the code for any end point
Starting from the leftmost bit, each bit of the code is set to true(1) orfalse(0)
according to the schema:
1 End point A (0000)
Bit 1 ≡ endpoint is above of the window = sign ( Y – Ymax ) Bit 1 ≡ = sign ( Y – Ymax) = sign ( 3 – 5) = -2 = 0
Bit 2 ≡ endpoint is below of the window = sign ( Ymin –Y ) Bit 2 ≡ = sign ( Ymin -Y) = sign ( 0 – 3) = -3 = 0
Bit 3 ≡ endpoint is right of the window = sign ( X – Xmax) Bit 3 ≡ = sign (X - Xmax) = sign ( 2 – 7) = -5 = 0
Bit 4 ≡ endpoint is left of the window = sign ( Xmin – X ) Bit 4 ≡ = sign ( Xmin - X) = sign ( 0 – 2) = -2 = 0
0000 - Visible
1000 - Invisible
91 92
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
23
8/3/2025
93 94
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
95 96
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
24
8/3/2025
97 98
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
General Terms:
• World coordinate – It is the Cartesian coordinate w.r.t which we define the diagram,
like Xwmin, Xwmax, Ywmin, Ywmax
• Device Coordinate –It is the screen coordinate where the objects are to be displayed,
like Xvmin, Xvmax, Yvmin, Yvmax
• Window –It is the area on the world coordinate selected for display.
• View Port –It is the area on the device coordinate where graphics is to be displayed.
99
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
25
8/3/2025
1. World Coordinates:
• The original coordinate system in which objects are defined.
2. Window:
• A portion of the world coordinates selected for viewing.
• Defines what to display.
• Think of it like a camera frame or zoomed-in area.
3. Viewport:
• A region on the screen or display device where the window contents
are mapped.
• Defines where to display.
• Usually specified in device coordinates (e.g., pixels).
101 102
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
26
8/3/2025
105 106
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
107 108
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
27
8/3/2025
Shading Algorithms
109 110
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
SHADING COLOURING
Colouring is the process of assigning colors to objects or surfaces in a scene to
• Phong Shading: Calculates lighting for every pixel improve their appearance and realism. It helps in distinguishing between
by interpolating surface normals across the polygon different parts of a model, shows lighting effects, and enhances visual
and applying the lighting model per pixel. This understanding of the image.
produces smooth shading with accurate highlights
and more realistic surfaces compared to Gouraud Colours models like:
shading.
• RGB (Red, Green, Blue):
RGB is an additive color model used in digital
displays. Colors are formed by mixing red,
• Halftone Shading: A shading technique that simulates green, and blue light, and combining all
continuous tones using patterns of dots or small three at full intensity produces white. Used
shapes, similar to printing methods. It creates the in digital displays like computer monitors,
illusion of shading by varying the density or size of TVs, smartphones, and cameras.
these dots rather than smooth color gradients.
111 112
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
28
8/3/2025
APPLICATIONS OF REALISM
Robot Simulations : Visualization of movement of their links and joints and end
effectors movement etc.
CNC programs verification of tool movement along the path prescribed and
estimation of cup height and surface finish etc.
Discrete Even Simulation : Most of DES packages provide the user to create
shop floor environment on the screen to visualize layout of facilities, movement
of material handling systems, performance of machines and tools.
Scientific Computing : Visualization of results of FEM analysis like iso-stress
and iso-strain regions, deformed shapes and stress contours. Temperature and
heat flux in heat-transfer analysis. Display and animation of mode shape in
vibration analysis.
Flight Simulation : Cockpit training for pilots is first being provided with flight
simulators, which virtually simulates the surrounding that an actual flight will
pass through.
115
Dr. [Link], M.E., Ph.D. / MECHANICAL/CEG–ANNA UNIVERSITY
29